Fix uses of indexOf, use !== -1 consistently