---
title: "buildOptional(_:)"
framework: speech
role: symbol
role_heading: Type Method
path: "speech/sfcustomlanguagemodeldata/datainsertablebuilder/buildoptional(_:)"
---

# buildOptional(_:)

Enables support for if statements that do not have an else clause.

## Declaration

```swift
static func buildOptional(_ component: (any DataInsertable)?) -> any DataInsertable
```

## See Also

### Result builder methods

- [buildArray(_:)](speech/sfcustomlanguagemodeldata/datainsertablebuilder/buildarray(_:).md)
- [buildBlock(_:)](speech/sfcustomlanguagemodeldata/datainsertablebuilder/buildblock(_:).md)
- [buildEither(first:)](speech/sfcustomlanguagemodeldata/datainsertablebuilder/buildeither(first:).md)
- [buildEither(second:)](speech/sfcustomlanguagemodeldata/datainsertablebuilder/buildeither(second:).md)
