Check is None instead of == None.