Improve error handling in OFDictionary and OFMutableDictionary.