hook should be checked for null