fixing ==None to is None everywhere