`not any(isinstance(i.args[0], Boolean) for i in expr.atoms(Not))` if I understand the definition correctly.