Attribute check for accessing dictionary values