only run hook if it is not nil