Fixed indexOf() condition

I forgot that 0 is a valid index for `.indexOf()`
Merge pull request #5 from LarryBattle/patch-2

Fixed indexOf() condition