---
title: isOptional
framework: coredata
role: symbol
role_heading: Instance Property
path: coredata/nspropertydescription/isoptional
---

# isOptional

A Boolean value that indicates whether the receiver is optional.

## Declaration

```swift
var isOptional: Bool { get set }
```

## Discussion

Discussion true if the receiver is optional, otherwise false. The optionality flag specifies whether a property’s value can be nil before an object can be saved to a persistent store. Special Considerations Setting this property raises an exception if the receiver’s model has been used by an object graph manager.

## See Also

### Accessing Features of a Property

- [entity](coredata/nspropertydescription/entity.md)
- [isIndexed](coredata/nspropertydescription/isindexed.md)
- [isTransient](coredata/nspropertydescription/istransient.md)
- [name](coredata/nspropertydescription/name.md)
- [userInfo](coredata/nspropertydescription/userinfo.md)
