Allow JSONEncodeObject:error: to return nil if given object is not serializable.
Updated tests.