Replace isKindOfClass with isMemberOfClass

NSArray and NSDictionary are class clusters and isKindOfClass doesn’t actually work apparently if the dictionary or array are compiler generated and other such situations.
Always return NSArray or NSDictionary

[self class] may return a class cluster class type that doesn't have the methods we need on it actually in fact.