---
title: notNil
framework: appintentstesting
role: symbol
role_heading: Type Property
platforms: [iOS 27.3+, iPadOS 27.3+, Mac Catalyst 27.3+, macOS 27.3+, tvOS 27.3+, visionOS 27.3+, watchOS 27.3+]
path: appintentstesting/intentvalueexpectation/notnil
---

# notNil

An expectation that requires a parameter, property, or result to have a value.

## Declaration

```swift
static var notNil: PrimitiveExpectation { get }
```

## Discussion

Discussion Use this expectation to check that a value is present without checking its content.
