# Is it possible to add null check in if

**URL:** <https://discuss.kotlinlang.org/t/is-it-possible-to-add-null-check-in-if/17303>\
**Category:** Language Design\
**Created:** [April 24, 2020, 3:58am UTC](https://discuss.kotlinlang.org/t/is-it-possible-to-add-null-check-in-if/17303 "2020-04-24T03:58:46Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Wasabi375](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/wasabi375/32/4741_2.png) [@Wasabi375](https://discuss.kotlinlang.org/u/Wasabi375)\
**Post date:** [April 26, 2020, 12:05pm UTC](https://discuss.kotlinlang.org/t/is-it-possible-to-add-null-check-in-if/17303/8 "2020-04-26T12:05:39Z")

</div>

There has been a discussion about the idom for nullable boolean checks [here](https://discuss.kotlinlang.org/t/is-the-idiom-for-checking-nullable-booleans-helpful/8238).  
Also the official guidelines say that you should prefer using `someNullableBoolean == true` or `someNulullableBoolean == false` over the elvis operator.  
[https://kotlinlang.org/docs/reference/idioms.html#consuming-a-nullable-boolean](https://kotlinlang.org/docs/reference/idioms.html#consuming-a-nullable-boolean)

---

_[View the full topic](https://discuss.kotlinlang.org/t/is-it-possible-to-add-null-check-in-if/17303)._
