Checking arguments passed as function to be a function