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

# isKeyType

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

## isKeyType(Type): Boolean

Returns `true` if the input is the Key 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 `isKeyType` behaves with different inputs.

#### Source

```DataWeave
%dw 2.0
import * from dw::core::Types
type AKey = Key
output application/json
---
{
   a: isKeyType(AKey),
   b: isKeyType(Key),
   c: isKeyType(Boolean),
}
```

#### Output

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