Improved compatibilities for custom classes which support objectForKey: and setObject:forKey:.