Fixed indexOf() condition

I forgot that 0 is a valid index for `.indexOf()`