Fixes #82 and other comparison related issues

 Fixes #82 and other comparison related issues by changing `== None` to `is None` and `!= None` to `is not None`. This is the preferred way to compare against None, and fixes the issues with Pillow's custom equality comparator.