Javascript Check If In Array Of Pointers