Check if the delegate responds to the methods.

Otherwise you get a runtime error if a delegate was set but doesn't
implement them. Those methods are optional in the protocol.
Merge pull request #93 from fernandonf/master

Check if the delegate responds to the methods.