Check If Array Contains Object Or String Javascript