Change comparisons to None to 'if cond is None:'