check if element exists in array javascript indexof