prefer is_function to typeof testing