Checking whether a function call is calling a previously defined function