improve is_enable_hook call