Add getHook function.
Optimize isHook (for not namespace and "->").