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

# isUnionType

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

## isUnionType(t: Type): Boolean

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

_Introduced in DataWeave version 2.3.0._

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>t</code></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
}
```
