Alter exists method to use array keys instead of properties.