Method

# IsNull

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Indicates whether the value passed is null.

## Usage

``` xojo
result = IsNull(value)
```

| Part   | Type                               | Description                                                                                    |
|--------|------------------------------------|------------------------------------------------------------------------------------------------|
| result | `Boolean</api/data_types/boolean>` | `True</api/language/true>` if *arg* is a valid object; `False</api/language/false>` otherwise. |
| value  | `Variant</api/data_types/variant>` | Variable, property, or object whose data type is being investigated.                           |

## Notes

A common usage of <span class="title-ref">IsNull</span> is to determine whether variable or property that is an object type contains a reference to an object or not.

While you can pass non-object data types (`String</api/data_types/string>` for example) to <span class="title-ref">IsNull</span>, it will always return `False</api/language/false>`.

## Sample code

If the value passed to <span class="title-ref">IsNull</span> does not contain an object instance, then <span class="title-ref">IsNull</span> returns `True</api/language/true>`. For example this code returns `True</api/language/true>`:

``` xojo
Var b As Boolean
Var f as FolderItem
b = IsNull(f)
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This code returns `False</api/language/false>`:

``` xojo
Var b As Boolean
Var f as FolderItem = SpecialFolder.Desktop
b = IsNull(f)
```

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |

<div class="seealso">

`Boolean</api/data_types/boolean>`, `Variant</api/data_types/variant>` data types.

</div>
