Simplify code
Flip the return value of `hasnext()`