# Validation.isNull

## Description

Validates a value if it is null

## Input / Parameter

| Name  | Description               | Input Type | Default | Options | Required |
| ----- | ------------------------- | ---------- | ------- | ------- | -------- |
| value | The value to to validate. | Any        | -       | -       | Yes      |

## Output

| Description                   | Output Type |
| ----------------------------- | ----------- |
| Returns the validation value. | Boolean     |

## Callback

N/A

## Video

Coming Soon.

## Example

In this example, we will check whether a value is null and get the validation using `Validation.isNull` and `Result.setApi` function.

### Step

1. Create an api and select on any api method tab, and select the secondary tab `Result`. Select `json` format and add new json key `isNull` as the key with `boolean` type.

![](https://489318254-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKpIso420Eq6T1MZWmK3R%2Fuploads%2Fgit-blob-c87e36fd9709e500f10e34f84f9084e00677b2f4%2FisNull-step-1.png?alt=media)

2. Select the secondary tab `Action`, Call the function `Result.setApi` and change the param type of `isNull` to subflow/function, drag `Validation.isNull` on it and add `notnull` value on it's `value` param.

![](https://489318254-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKpIso420Eq6T1MZWmK3R%2Fuploads%2Fgit-blob-fba197394cba4b5072e89ba62fe352c3a2f1852d%2FisNull-step-2.png?alt=media)

### Result

1. Select the secondary tab `Test`, click on run button and check the json response, it will show {"isNull": false} because `notnull` is not a null value.

![](https://489318254-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKpIso420Eq6T1MZWmK3R%2Fuploads%2Fgit-blob-f9abb5ebd277f4c7f9dbf0d65dec5c696428ee0b%2FisNull-result-1.png?alt=media)

## Links
