---
schema_version: "1"
id: ccf0dc3865eec6cf019d7b02fa9e3688950f5e8e49a4107a83d0028809eed7df
title: isUnionType
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.3/dw-types-functions-isuniontype.md
canonical_url: https://docs.mulesoft.com/dataweave/2.3/dw-types-functions-isuniontype
source_site: docs.mulesoft.com
content_type: documentation
content_hash: e1df2250d96e2378316985acb0d89a833eedc1766fc5c0ba7b50267bb9e404e7
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: DataWeave
version: 2.3
---

# isUnionType

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## isUnionType(Type): Boolean

Returns `true` if the input type is the Union type.

_Introduced in DataWeave 2.3.0. Supported by Mule 4.3 and later._

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p>t</p></td><td><p>The type to check.</p></td></tr></tbody></table>

### Example

This example shows how `isUnionType` behaves with different inputs.

#### Source

```DataWeave
%dw 2.0
import * from dw::core::Types
type AType = String | Number
output application/json
---
{
   a: isUnionType(AType),
   b: isUnionType(Boolean),
}
```

#### Output

```Json
{
  "a": true,
  "b": false
}
```
