Fixed an edge case for objects whose attributes are not always available.