--- alias: user-guide-automation-converter-isempty description: "This converter checks whether the input value is empty and returns either a Boolean or a passthrough/undefined" --- # Is Empty The **Is Empty** converter inspects the input value and reports whether it qualifies as empty. The **Result Type** setting controls whether the converter outputs a boolean flag or passes the input value through. The converter treats a value as empty when it is one of the following: - A string that is blank, whitespace-only, `{}`, or `[]`. - An array with no items. - An object with no properties. - An object whose only property is `$id`. The converter reports all other values as not empty, including numbers, booleans, dates, `null`, and `undefined`. ## Settings | Name | Data Type | Possible Values | Description | | ---------- | --------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | resultType | `Enum` | `Boolean`
`NullOrValue` | Controls the output. `Boolean` returns `true` when the input is empty and `false` otherwise. `NullOrValue` returns `undefined` when the input is empty and passes the input value through otherwise. Default is `Boolean`. | Table 1: Settings ![Settings panel for the Is Empty converter.](./images/converter_is_empty_settings.png) ## Examples ### Boolean Result | Input | Output | | ------------------------------ | ------- | | `""` | `true` | | `" "` | `true` | | `"{}"` | `true` | | `"[]"` | `true` | | `"hello"` | `false` | | `[]` | `true` | | `[1, 2, 3]` | `false` | | `{}` | `true` | | `{ "$id": "123" }` | `true` | | `{ "$id": "123", "name": "x" }`| `false` | | A Date value | `false` | | `null` | `false` | | `42` | `false` | Table 2: Examples with the Boolean result type ### NullOrValue Result | Input | Output | | ------------ | ----------- | | `""` | `undefined` | | `"{}"` | `undefined` | | `"[]"` | `undefined` | | `[]` | `undefined` | | `["a"]` | `["a"]` | | `"hello"` | `"hello"` | Table 3: Examples with the NullOrValue result type ### Failure Behavior This converter never fails. See [[user-guide-automation-converters-index]] for the full set of failure patterns across converters.