I have an object in objective-c at runtime, from which I only know the KVC key and I need to detect the return value type (e.g. I need to know if its an NSArray or NSMutable
Cheap answer: use the NSObject+Properties source here.
It implements the same methodology described above.