Second check won't work everywhere.

`is` compares identifies (e.g. if two variables point to the same objects)  which means you should only use it for immutable types (`True`, `False`, `None`, ...) otherwise you might get an unexpected result.

When you are comparing values you should use `==` or `!=` in this case.

This is also the reason why PyPy tests are currently failing.