check to see if hook is available

No, for this to work reliably you would need to register hooks, which can’t be done. The only way to know if a template triggers a hook is to load the template and find out.

There is a solution to your problem, but testing if a hook is available is not that solution.