# isNullOrEmpty

Source: https://taxilang.org/docs/language/stdlib/isNullOrEmpty

**Full name:** `taxi.stdlib.isNullOrEmpty`

## Signature

```taxi
declare extension function <T> isNullOrEmpty(collection:T[]):Boolean
```

## Description

Returns `true` if the provided collection is either `null` or contains zero elements.

```taxi
find { order: Order } as {
   hasNoItems: Boolean = order.items.isNullOrEmpty()
}
```

## Examples

Returns `true` for an empty collection, `false` when the collection has elements.

Schema:

```taxi
model Bag {
   items: String[]
}
```

Query:

```taxi
given {
   emptyBag: Bag = { items: [] },
   fullBag: Bag = { items: ['apple', 'banana'] }
}
find {
   emptyCheck: Boolean = emptyBag.items.isNullOrEmpty()
   fullCheck: Boolean = fullBag.items.isNullOrEmpty()
}
```

Result:

```json
{
  "emptyCheck": true,
  "fullCheck": false
}
```
