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.