returns True if the element has a parent element.
def has_parent(self): return False if self._parent is None else True