Error:

Get class object

Class class = [NSString class];

Get superclass object

Class parent = [NSString superclass];

Check whether class is a subclass of another class

// Result is YES
BOOL isChild = [NSMutableString isSubclassOfClass:[NSString class]];

Check whether intances of the class respond to selector

// Result is YES
BOOL responds = [NSMutableArray instancesRespondToSelector:@selector(addObjects:count:)];

Check whether class conforms to protocol

// result is YES
BOOL conforms = [NSArray conformsToProtocol:@protocol(NSMutableCopying)];

Check whether object conforms to protocol

BOOL conforms = [obj conformsToProtocol:@protocol(NSMutableCopying)];

Check whether object is an instance of given class

BOOL isCollection = [xxx isMemberOfClass:[CGCollection class]];

Check whether object can be cast to given class

// YES if obj is an instance of CGItem or any class that inherits CGItem
BOOL isItem = [obj isKindOfClass:[CGItem class]]; 

Check whether object responds to given selector

BOOL responds = [obj respondsToSelector:@selector(ping:)];

Check whether object conforms to given protocol

BOOL conforms = [obj conformsToProtocol:@protocol(MyProtocol)];

Perform selector on the object

id clone = [obj performSelector:@selector(copy)];

Perform selector with one argument on the object

[obj performSelector:@selector(getAnswer:) withObject:@"Why?"];

Perform selector with two arguments on the object

[obj performSelector:@selector(doFoo:withBar:) withObject:@"foo" withObject:@"bar"];