# Null Check

This is a pre-built Action located under the **@Generic Element**. The functionality of this action in Avo Assure is to verify whether the specified input is a null or empty value. The result is stored in the given dynamic variable for further use during test execution.

## **Syntax**

**Input Value**: `<Variable>`&#x20;

| Argument                         | Description                                                                                                                                |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| <p>\<Variable><br>(Required)</p> | <p>Provide the name of the variable you want to check for null or empty.<br>Supported Input format: </p><ul><li>Dynamic variable</li></ul> |

**Output Value**: `<Dynamic Variable>(Optional);<Dynamic Variable>(Optional)`

| Argument                                                    | Description                                                       |
| ----------------------------------------------------------- | ----------------------------------------------------------------- |
| \<Dynamic Variable>(Optional);\<Dynamic Variable>(Optional) | Both dynamic variable stores the status as **True** or **False**. |

### **Example: Performing a Null Check on a Variable**

In this example, we explain how to check whether a given variable is null.

* **Action**: Null Check
* **Input Value**: {Username}
  * The argument (**{Username}**) specifies the variable to be checked for null or empty value.
* **Output Value**: {Status}
  * The result of the null check is stored in the **{Status}** dynamic variable, with the following possible values:
    * **True**: If the variable is null or empty.
    * **False**: If the variable contains a value.
* **Logical Explanation**: The **Null Check** action reads the value from the **Input Value** column (**{Username}**). It evaluates whether the variable is null or empty. The result of this evaluation (**True**) is stored in the **{Status}** variable.

{% hint style="info" %}
**Note**: In this example, a test step with the **Create Dynamic Variable** action is used to verify that the dynamic variable contains a value.
{% endhint %}

<figure><img src="https://2174257472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fk8QZzXZMIJSStKAzDSTu%2Fuploads%2FizAMDQEolzTm2Z2rEpKN%2Funknown.png?alt=media&#x26;token=bc1b6dd6-59ba-41f7-a0f9-d5d24488648f" alt=""><figcaption></figcaption></figure>
