'Check if the attribute with the given name is defined.
This is mostly important for optional addresses.'

def has_attribute(self, name):

    for attributename in self.names.values():
        if (attributename == name):
            return True
    return False
