Added support for canceling request for custom protocol.
* If the handler function for a custom protocol returns null or undefined, then it'll just cancel and ignore that request.