Adding functionality to add additional checks before attach

...ttachTo

Signed-off-by:Craig Russell <tenowg@thedemgel.com>

This could also be done by removing the final from attachTo(), but assuming this would require that author remember to add the super call may not be the best method.