check if value already exists in array javascript