# Getting Null from Casted

**URL:** <https://forums.unrealengine.com/t/getting-null-from-casted/1226614>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [July 12, 2023, 2:53am UTC](https://forums.unrealengine.com/t/getting-null-from-casted/1226614 "2023-07-12T02:53:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GomiArashi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gomiarashi/32/729900_2.png) [@GomiArashi](https://forums.unrealengine.com/u/GomiArashi)\
**Post date:** [July 12, 2023, 2:53am UTC](https://forums.unrealengine.com/t/getting-null-from-casted/1226614/1 "2023-07-12T02:53:23Z")

</div>

Trying to pull the seconds from a timespan variable I have stored in the character data, however when I run it I get the error “Accessed None trying to read property HUD1”, going into debug I can see it’s reading HUD1 and it’s children. What’s going wrong?

 ![wtf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/5/1/a511c2406966e8c9d4f17b262a584dcbc56ab897.png)

---

<div class="post-metadata">

**Author:** ![Hexavx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hexavx](https://forums.unrealengine.com/u/Hexavx)\
**Post date:** [July 12, 2023, 3:44am UTC](https://forums.unrealengine.com/t/getting-null-from-casted/1226614/2 "2023-07-12T03:44:28Z")

</div>

Looks like the **TimeCycle** event is run in every tick. So, the **HUD1** might not constructed yet on early execution. Use **IsValid Exec** to check the **HUD1** should eliminate the errors.

---

<div class="post-metadata">

**Author:** ![GomiArashi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gomiarashi/32/729900_2.png) [@GomiArashi](https://forums.unrealengine.com/u/GomiArashi)\
**Post date:** [July 12, 2023, 3:17pm UTC](https://forums.unrealengine.com/t/getting-null-from-casted/1226614/3 "2023-07-12T15:17:10Z")

</div>

That did it! thank you so much!

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [August 11, 2023, 3:17pm UTC](https://forums.unrealengine.com/t/getting-null-from-casted/1226614/4 "2023-08-11T15:17:59Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
