Retrieves an object by ID from the collection specified by the passed key.
- macOS 10.2+
value is invoked if it exists. Otherwise, raises an
NSUndefined. The declared type of
unique in the constructed method must be
NSString *, or one of the scalar types that can be encapsulated by