# Verse - How do I check if a referenced device is valid?

**URL:** <https://forums.unrealengine.com/t/verse-how-do-i-check-if-a-referenced-device-is-valid/863775>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [April 6, 2023, 5:24pm UTC](https://forums.unrealengine.com/t/verse-how-do-i-check-if-a-referenced-device-is-valid/863775 "2023-04-06T17:24:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tistik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tistik](https://forums.unrealengine.com/u/Tistik)\
**Post date:** [April 6, 2023, 5:24pm UTC](https://forums.unrealengine.com/t/verse-how-do-i-check-if-a-referenced-device-is-valid/863775/1 "2023-04-06T17:24:52Z")

</div>

I have a custom device in which I added some @editable devices to expose in UEFN. Some of them are mandatory but some are optional, to allow for more freedom in behaviour implementation.

I’m not sure how to check whether an editable device has been specified in UEFN or not. I suppose there must be some sort of IsValid() function inherited from the base device class, but I failed to find it.

---

<div class="post-metadata">

**Author:** ![Waurelius](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/waurelius/32/924263_2.png) [@Waurelius](https://forums.unrealengine.com/u/Waurelius)\
**Post date:** [April 6, 2023, 6:12pm UTC](https://forums.unrealengine.com/t/verse-how-do-i-check-if-a-referenced-device-is-valid/863775/2 "2023-04-06T18:12:58Z")

</div>

Hi Tistik, by optional do you mean you literally defined them as an ‘option’ type?  
(as described here: [Option](https://dev.epicgames.com/documentation/en-us/uefn/option-in-verse))

---

<div class="post-metadata">

**Author:** ![Tistik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tistik](https://forums.unrealengine.com/u/Tistik)\
**Post date:** [April 6, 2023, 6:57pm UTC](https://forums.unrealengine.com/t/verse-how-do-i-check-if-a-referenced-device-is-valid/863775/3 "2023-04-06T18:57:47Z")

</div>

No, I didn’t know about Option types, but that should do the job! Will give it a try. Thanks!

---

<div class="post-metadata">

**Author:** ![Daigoro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Daigoro](https://forums.unrealengine.com/u/Daigoro)\
**Post date:** [October 15, 2023, 8:44pm UTC](https://forums.unrealengine.com/t/verse-how-do-i-check-if-a-referenced-device-is-valid/863775/4 "2023-10-15T20:44:11Z")

</div>

Hello, i have the exact same issue.

```auto
game_manager_device := class(creative_device):

    @editable
    TestDevice: mutator_zone_device= mutator_zone_device{}

    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=
        # Does something with TestDevice if it is set properly

```

The issue with the code above is, that forgetting to set the TestDevice in the Editor leaves to VerseRuntimeErrors. The is currently no way to check if the editable mutator\_zone\_device is actually a valid reference.
