NoneType can not be compared to Int in py 3+

this was valid in py27, where 
```python
(None < 2) == True
```
in py 3 it throws an error.