js best way to check if variable is function code example Example: check if function javascript variableToCheck instanceof Function