A little more pythonic

Replacing '!=' with 'is not' to conform with the zen of python