javascript check for object in array