Test if a value is a function.