Add error handling for more invalid forms of type specifications

Since changing to using the full puppet parser the type specifications
would be able to parse, but not interpret, arbitrary puppet expressions.
The error messages in those cases would however only be about not being
able to handle a particular method. This adds checks for those cases and
improves the error messages.