Implement condition on hook.