# Understanding Nullability In Kotlin

DevFeed: [Understanding Nullability In Kotlin](<https://devfeed.tech/articles/understanding-nullability-in-kotlin-22845.md>)

Original publisher: [Read original article](<http://androidessence.com/understanding-nullability-in-kotlin/>)

Author: Adam McNeilly

Published: 2017-06-28T00:00:00Z

Content type: tutorial

Language: en

Sources: [Android Essence](<https://devfeed.tech/sources/android-essence.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [elvis-operator](<https://devfeed.tech/tags/elvis-operator.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [null](<https://devfeed.tech/tags/null.md>), [null-safety](<https://devfeed.tech/tags/null-safety.md>)

## AI overview

This tutorial explains Kotlin's nullability and null-safety features for Java programmers. It covers nullable and non-nullable types, explicit null checks, the safe operator, and the Elvis operator, while noting that Java interoperability can still allow NullPointerException risks.

## Source excerpt

Every Java programmer has faced the dreaded NullPointerException at some point in their life. Sometimes it's your fault, sometimes it's a pesky race condition. Regardless, it's a head ache and generally leads to a ton of if (myVariable != null) { } conditions all over your code. However, the latest craze Kotlin can help with that too. Kotlin introduced null safety into its type system, with the potential of removing all NPEs. This post is both going to review the official docs linked above, as well as provide some common tips and tricks to work with the nullability - something that is new in this language for many Java programmers.