pwtools
Check if self has the attribute self.<attr> and if it is _not_ None.
attr (str) – Attrubiute name, e.g. ‘foo’ for self.foo
True (attr is defined and not None)
False (not defined or None)