Exception rather than null for missing definition.

This just changes:

* An undefined, un-typehinted parameter now throws an exception, rather than defaulting to null.
* Fixed typos in error message definition.
* Changed unit tests for the above two.

It also fixed casting from a `$reflParam` to string to calling `$reflParam->getName()` which I presume was the intended behaviour.