Add exception for AttributeError