check if function required properly code example Example: check if function javascript variableToCheck instanceof Function