Add checks to HookDefinition constructor, update docs and add tests

Change-Id: I527c888eea2d40a5406c64a247ae80e384fe002f
Fix some docs

Change-Id: I3cf93fab592be76b3fe5af3a1d647903ff1cfd85