Made the errors a bit more useful for adding/clearing invalid hooks

Added a check for the 'hook' option.

Added tests for the invalid hook checks