Keep in mind that getType() cannot test the type of an expression, only a variable — so getType("Hello!") for example is invalid.

Advanced Uses

If possible, avoid comparing the result of getType() to an actual string. The risk here is that when the calculator is switched to a different language, the output of getType() changes language too. This is only a minor consideration. But if you already have a variable of the right type lying around, and you want to test an unknown variable, compare their getTypes(). For example: