Here, if I am not wrong, you may want to take care of expressions of type Not(a), where a is an atom. 'Not(a).is_Atom' evaluates to False.