Fixes #82 and other comparison related issues by changing '== None' to 'is None' and '!= None' to 'is not None'