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

# 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
}
```
