---
title: isNull()
framework: healthkit
role: symbol
role_heading: Instance Method
path: healthkit/hkunit/isnull()
---

# isNull()

Returns a Boolean value indicating whether the unit is null.

## Declaration

```swift
func isNull() -> Bool
```

## Return Value

Return Value true if the unit is null; otherwise, false.

## Discussion

Discussion Null units occur only when you create compound units in which all the units cancel out. For example, if you tried to create a unit by dividing deciliters by liters (dL/L), you would end up with a null unit.

## See Also

### Working with units

- [init(from:)](healthkit/hkunit/init(from:)-9qont.md)
- [unitString](healthkit/hkunit/unitstring.md)
