# How to get the non-Nothing type from \`Union{T,Nothing}\`

**URL:** <https://discourse.julialang.org/t/how-to-get-the-non-nothing-type-from-union-t-nothing/30523>\
**Category:** General Usage\
**Tags:** question\
**Created:** [October 31, 2019, 7:03am UTC](https://discourse.julialang.org/t/how-to-get-the-non-nothing-type-from-union-t-nothing/30523 "2019-10-31T07:03:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [October 31, 2019, 7:13am UTC](https://discourse.julialang.org/t/how-to-get-the-non-nothing-type-from-union-t-nothing/30523/2 "2019-10-31T07:13:02Z")

</div>

There is ‘nonmissingtype’ that does this for ’Missing’. You could look at it’s definition and do the same for ‘Nothing’.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-get-the-non-nothing-type-from-union-t-nothing/30523)._
