Fixed issue with comparing against None

Thanks to github user sidahmed-malaoui for the bug report
2 files changed