angular typescript check if a variable is a funcitron code example Example: check if function javascript variableToCheck instanceof Function