<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFNull",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@T@CFNullRef"
  },
  "title" : "CFNull"
}
-->

# CFNull

```
class CFNull
```

## Overview

The CFNull opaque type defines a unique object used to represent null values in collection objects (which don’t allow `NULL` values). CFNull objects are neither created nor destroyed. Instead, a single CFNull constant object—[`kCFNull`](/documentation/CoreFoundation/kCFNull)—is defined and is used wherever a null value is needed.

The CFNull opaque type is available in macOS 10.2 and later.

## Topics

### CFNull Miscellaneous Functions

[`CFNullGetTypeID()`](/documentation/CoreFoundation/CFNullGetTypeID())

Returns the type identifier for the CFNull opaque type.

### Constants

[Predefined Value](/documentation/CoreFoundation/predefined-value)

Predefined CFNull object.

## See Also

  [Collections Programming Topics for Core Foundation](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFCollections/CFCollections.html#//apple_ref/doc/uid/10000124i)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)