fix(client): Throw an exception if invokeHandler is passed an invalid handler.

This is for you @pdehaan!

* This will help devs catch errors faster.

fixes #1105