# How to adapt "IsValid" node logic for a thread safe environment?

**URL:** <https://forums.unrealengine.com/t/how-to-adapt-isvalid-node-logic-for-a-thread-safe-environment/1167647>\
**Category:** Blueprint\
**Tags:** multithreading, unreal-engine, Blueprint, question\
**Created:** [May 16, 2023, 2:18pm UTC](https://forums.unrealengine.com/t/how-to-adapt-isvalid-node-logic-for-a-thread-safe-environment/1167647 "2023-05-16T14:18:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![devmonkey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@devmonkey](https://forums.unrealengine.com/u/devmonkey)\
**Post date:** [May 16, 2023, 2:18pm UTC](https://forums.unrealengine.com/t/how-to-adapt-isvalid-node-logic-for-a-thread-safe-environment/1167647/1 "2023-05-16T14:18:08Z")

</div>

I have some logic in my Event Graph that needs to be moved to the BlueprintThreadSafeUpdationAnimation function (like how Lyra works).

I have a section that uses e.g. Try Get Pawn Owner → Get Component by Class → Is Valid, etc, to help make variables from it.  
But Is Valid is not thread safe.

How can this be done?

---

<div class="post-metadata">

**Author:** ![Appear](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/appear/32/465450_2.png) [@Appear](https://forums.unrealengine.com/u/Appear)\
**Post date:** [February 20, 2024, 8:56am UTC](https://forums.unrealengine.com/t/how-to-adapt-isvalid-node-logic-for-a-thread-safe-environment/1167647/2 "2024-02-20T08:56:16Z")

</div>

Bump, this would be nice to have a solution for, I will post it here if I find one.

---

<div class="post-metadata">

**Author:** ![kerds78](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kerds78/32/937710_2.png) [@kerds78](https://forums.unrealengine.com/u/kerds78)\
**Post date:** [May 24, 2024, 4:04pm UTC](https://forums.unrealengine.com/t/how-to-adapt-isvalid-node-logic-for-a-thread-safe-environment/1167647/3 "2024-05-24T16:04:57Z")

</div>

The Lyra project handles it with a not equals check with an empty reference (blueprint equivalent of nullptr?) like so:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/b/d/fbdf7fa55fc4f9afddaa82ae91f40c4dd01ca93a.png)

I guess this is the Epic-recommended solution, but it would be interesting if someone from Epic could confirm this.
