Added X::TypeCheck::Argument and means for the Optimizer to throw typed ...

...exceptions.

As per PR #237, sorry for the mess.