Use is instead of == for singleton compare

- Python recommends using is instead of == to compare a variable to None