Type Checking Functions
Type checking functions validate data before you use it — preventing errors, handling missing values, and ensuring your formulas work with the right kind of input. Use these when processing user input, API responses, or dynamic data where the type isn't guaranteed.
Available Functions
Function | Checks for | Returns true when... |
|---|---|---|
ISNUMBER | Numbers | Value is numeric (integer or decimal) |
ISSTRING | Text | Value is a string |
ISBOOL | Booleans | Value is |
ISARRAY | Lists | Value is an array |
ISOBJECT | Objects | Value is a key-value object |
ISTABLE | Tables | Value is a two-dimensional table |
ISFUNCTION | Functions | Value is a function or lambda |
ISEMPTY | Empty values | Value is blank, null, or missing |
ISERROR | Errors | Expression results in an error |
ISEVEN | Even numbers | Number divides evenly by 2 |
ISODD | Odd numbers | Number doesn't divide evenly by 2 |
Common Patterns
Validate user input before processing:
IF(ISNUMBER(quantity), quantity * price, "Enter a valid number")Handle optional or missing data:
IF(ISEMPTY(discount), base_price, base_price - discount)Prevent formula crashes:
IF(ISERROR(DIVIDE(total, count)), 0, DIVIDE(total, count))Filter by data type:
FILTER(responses, LAMBDA(r, ISSTRING(r.comment)))Function Reference
ISNUMBER
Syntax: ISNUMBER(value)
Checks whether a value is a number (integer or decimal).
Example — Validate calculator input:
IF(ISNUMBER(user_input), user_input * 1.2, "Please enter a number")Strings like "42" are not numbers. Booleans and NULL also return false.
Tests:
ISNUMBER(42) → true
ISNUMBER(3.14) → true
ISNUMBER("42") → false
ISNUMBER(NULL) → falseISSTRING
Syntax: ISSTRING(value)
Checks whether a value is text.
Example — Validate email field:
IF(ISSTRING(form.email), CONCAT("Welcome ", form.email), "Invalid input")Empty strings "" return true. Use with ISEMPTY() to catch blank text.
Tests:
ISSTRING("hello") → true
ISSTRING(42) → false
ISSTRING("") → true
ISSTRING(NULL) → falseISBOOL
Syntax: ISBOOL(value)
Checks whether a value is a boolean (true or false).
Example — Validate configuration toggle:
IF(ISBOOL(settings.enabled), settings.enabled, false)Strings "true" and "false" are not booleans. Numbers like 1 or 0 aren't either.
Tests:
ISBOOL(true) → true
ISBOOL(false) → true
ISBOOL("true") → false
ISBOOL(1) → falseISARRAY
Syntax: ISARRAY(value)
Checks whether a value is an array (list).
Example — Handle single vs multiple selections:
IF(ISARRAY(selected_items), COUNT(selected_items), 1)Empty arrays ARRAY() still return true. Tables and objects return false.
Tests:
ISARRAY(ARRAY(1,2,3)) → true
ISARRAY("text") → false
ISARRAY(ARRAY()) → true
ISARRAY(OBJECT("a",1)) → falseISOBJECT
Syntax: ISOBJECT(value)
Checks whether a value is an object (key-value pairs).
Example — Validate API response:
IF(ISOBJECT(api_response), GET(api_response, "status"), "Invalid response")Arrays and tables return false. Nested objects still return true.
Tests:
ISOBJECT(OBJECT("name", "Alice")) → true
ISOBJECT(ARRAY(1,2,3)) → false
ISOBJECT("text") → false
ISOBJECT(NULL) → falseISTABLE
Syntax: ISTABLE(value)
Checks whether a value is a table (two-dimensional dataset).
Example — Validate data before lookup:
IF(ISTABLE(pricing_data), VLOOKUP("SKU-100", pricing_data, 2), "Invalid data")Empty tables TABLE() still return true. Arrays and objects return false.
Tests:
ISTABLE(TABLE(ARRAY(1,2), ARRAY(3,4))) → true
ISTABLE(ARRAY(1,2,3)) → false
ISTABLE(TABLE()) → trueISFUNCTION
Syntax: ISFUNCTION(value)
Checks whether a value is a function or lambda expression.
Example — Validate callback parameter:
IF(ISFUNCTION(callback), callback(), "Expected a function")Text like "LAMBDA(x, x+1)" returns false — it must be an actual function.
Tests:
ISFUNCTION(LAMBDA(x, x+1)) → true
ISFUNCTION("LAMBDA(x, x+1)") → false
ISFUNCTION(42) → falseISEMPTY
Syntax: ISEMPTY(value)
Checks whether a value is empty, blank, null, or missing.
Example — Validate required form field:
IF(ISEMPTY(user.email), "Email required", "Valid")0 and false are not empty. Empty arrays ARRAY() return true.
Tests:
ISEMPTY("") → true
ISEMPTY(NULL) → true
ISEMPTY(0) → false
ISEMPTY(false) → false
ISEMPTY(ARRAY()) → trueISERROR
Syntax: ISERROR(value)
Checks whether an expression results in an error.
Example — Handle division by zero:
IF(ISERROR(DIVIDE(total, count)), 0, DIVIDE(total, count))Use with IF() to provide fallback values instead of breaking your formula.
Tests:
ISERROR(DIVIDE(10, 0)) → true
ISERROR(DIVIDE(10, 2)) → false
ISERROR("text") → false
ISERROR(NULL) → falseISEVEN
Syntax: ISEVEN(number)
Checks whether a number is even (divisible by 2 with no remainder).
Example — Alternate row colors:
IF(ISEVEN(ROW_INDEX), "light-gray", "white")Negative even numbers return true. Non-numeric inputs return false.
Tests:
ISEVEN(4) → true
ISEVEN(7) → false
ISEVEN(0) → true
ISEVEN(-8) → trueISODD
Syntax: ISODD(number)
Checks whether a number is odd (not divisible evenly by 2).
Example — Conditional promotions:
IF(ISODD(order_number), "Discount applied", "No discount")Negative odd numbers return true. Pair with ISEVEN() for alternating logic.
Tests:
ISODD(5) → true
ISODD(8) → false
ISODD(0) → false
ISODD(-3) → trueSee Also
FormulaScript Overview · IF · FILTER · LAMBDA