# Null-Safety

Published articles for Null-Safety.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Kotlin in 3 minutes

DevFeed: [Kotlin in 3 minutes](<https://devfeed.tech/articles/kotlin-in-3-minutes-39346.md>)

Original publisher: [Read original article](<https://kt.academy/article/kotlin_in_3_minutes>)

Published: 2026-05-25T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [Java](<https://devfeed.tech/topics/java.md>), [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [Ktor](<https://devfeed.tech/topics/ktor.md>), [Spring Boot](<https://devfeed.tech/topics/spring-boot.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [ktor](<https://devfeed.tech/tags/ktor.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [null-safety](<https://devfeed.tech/tags/null-safety.md>), [spring-boot](<https://devfeed.tech/tags/spring-boot.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

A concise overview of Kotlin covering its interoperability with Java, compilation to JVM bytecode, JavaScript, and native platforms, and its use across Android, backend, iOS, desktop, and web development. It also introduces Kotlin's type inference and null-safety features.

### Source excerpt

The essence of Kotlin, what is it and why it gets so popular.

## KotlinConf 2025 Highlights Backend-Oriented Kotlin Language and Ecosystem Updates

DevFeed: [KotlinConf 2025 Highlights Backend-Oriented Kotlin Language and Ecosystem Updates](<https://devfeed.tech/articles/kotlinconf-2025-is-a-real-bowl-of-fresh-air-for-backend-devs-38829.md>)

Original publisher: [Read original article](<https://lengrand.fr/kotlinconf-2025-is-a-real-bowl-of-fresh-air-for-backend-devs/>)

Author: Julien

Published: 2025-05-22T14:34:02Z

Content type: opinion

Language: en

Sources: [Thoughts, stories and ideas.](<https://devfeed.tech/sources/thoughts-stories-and-ideas.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [jetbrains](<https://devfeed.tech/topics/jetbrains.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [destructuring](<https://devfeed.tech/topics/destructuring.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [Null-Safety](<https://devfeed.tech/topics/null-safety.md>)

Tags: [2025](<https://devfeed.tech/tags/2025.md>), [conference](<https://devfeed.tech/tags/conference.md>), [destructuring](<https://devfeed.tech/tags/destructuring.md>), [development](<https://devfeed.tech/tags/development.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [jetbrains](<https://devfeed.tech/tags/jetbrains.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlinconf](<https://devfeed.tech/tags/kotlinconf.md>), [null-safety](<https://devfeed.tech/tags/null-safety.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

A personal assessment of KotlinConf 2025 that focuses on JetBrains' renewed attention to backend developers. The article highlights Kotlin language updates including name-based destructuring and richer error handling, while also discussing the K2 compiler and Kotlin's backend developer experience.

### Source excerpt

With their keynote that JetBrains intentionally started putting backend developers in the spotlight again. They made big, impactful announcements, both at an ecosystem and language levels and I can't wait to try out all of the new goodies.

## Nullability in Kotlin

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

Original publisher: [Read original article](<https://kt.academy/article/kfde-nullability>)

Published: 2023-03-13T00:01:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Null-Safety](<https://devfeed.tech/topics/null-safety.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [elvis-operator](<https://devfeed.tech/tags/elvis-operator.md>), [exception](<https://devfeed.tech/tags/exception.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [null-safety](<https://devfeed.tech/tags/null-safety.md>), [safety](<https://devfeed.tech/tags/safety.md>), [type](<https://devfeed.tech/tags/type.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This tutorial explains Kotlin null-safety and how nullable values are handled. It describes explicit values and nullable types, then introduces safe calls, not-null assertions, smart casts, and the Elvis operator.

### Source excerpt

How Kotlin null-safety works, and how can we deal with nullable values.

## Nullability in GraphQL and Apollo Kotlin

DevFeed: [Nullability in GraphQL and Apollo Kotlin](<https://devfeed.tech/articles/nullability-in-graphql-and-apollo-kotlin-23471.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/nullability-in-graphql-and-apollo-kotlin>)

Author: Benoit Lubek

Published: 2023-02-27T08:10:00Z

Content type: tutorial

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [GraphQL](<https://devfeed.tech/topics/graphql.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [client library](<https://devfeed.tech/topics/client-library.md>), [Code generation](<https://devfeed.tech/topics/code-generation.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>)

Tags: [apollo](<https://devfeed.tech/tags/apollo.md>), [client-library](<https://devfeed.tech/tags/client-library.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [null-safety](<https://devfeed.tech/tags/null-safety.md>), [polymorphism](<https://devfeed.tech/tags/polymorphism.md>)

### AI overview

This tutorial explains how Apollo Kotlin represents GraphQL nullability in generated Kotlin models. It covers nullable schema fields, conditional directives, fragments, polymorphism, and GraphQL partial responses caused by errors.

### Source excerpt

The concept of is sometimes called a "billion dollar mistake". Mistake or not, is here to stay and there are ways to coexist peacefully! In fact, nullability is one of the key features of GraphQL, allowing API authors to clearly specify which fields of a type are nullable. As for Kotlin, the language supports nullability in its type system, significantly reducing the risk for errors - for example assigning a potentially value to a non-nullable field won't even compile!

## Nulls and Null Safety

DevFeed: [Nulls and Null Safety](<https://devfeed.tech/articles/nulls-and-null-safety-25061.md>)

Original publisher: [Read original article](<https://typealias.com/start/kotlin-nulls/>)

Author: author@typealias.com (Dave Leeds)

Published: 2021-03-30T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>)

Tags: [elvis-operator](<https://devfeed.tech/tags/elvis-operator.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [learn-to-program](<https://devfeed.tech/tags/learn-to-program.md>), [not-null-assertion-operator](<https://devfeed.tech/tags/not-null-assertion-operator.md>), [null](<https://devfeed.tech/tags/null.md>), [null-safety](<https://devfeed.tech/tags/null-safety.md>), [optional](<https://devfeed.tech/tags/optional.md>), [programming](<https://devfeed.tech/tags/programming.md>), [safe-call-operator](<https://devfeed.tech/tags/safe-call-operator.md>), [smart-cast](<https://devfeed.tech/tags/smart-cast.md>)

### AI overview

An introduction to nulls and null safety in Kotlin, explaining that variables may not always hold a value and setting up a coffee-rating example implemented in Kotlin.

### Source excerpt

So far in this book, every time that we created a variable, whether it was a String, an Int, or a Boolean, we assigned a value to it. There are times, though, when we need to create a variable that might not actually hold a value! This brings us to the exciting topic of nulls! Introduction to Nulls James has set up a coffee stand downtown, and he's ready to start sharing his fine brew!

## Kotlin Hyderabad: Introduction to Kotlin

DevFeed: [Kotlin Hyderabad: Introduction to Kotlin](<https://devfeed.tech/articles/kotlin-hyderabad-introduction-to-kotlin-28393.md>)

Original publisher: [Read original article](<https://siddroid.com/post/talk-introduction-to-kotlin-siddhesh-patil-kotlin-hyderabad/>)

Author: Siddhesh Patil

Published: 2020-08-01T10:47:09Z

Content type: article

Language: en

Sources: [Sid Patil - Android Engineer and Kotlin Advocate](<https://devfeed.tech/sources/sid-patil-android-engineer-and-kotlin-advocate.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Android](<https://devfeed.tech/topics/android.md>), [interoperability](<https://devfeed.tech/topics/interoperability.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [beginner](<https://devfeed.tech/tags/beginner.md>), [classes](<https://devfeed.tech/tags/classes.md>), [event](<https://devfeed.tech/tags/event.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [interoperability](<https://devfeed.tech/tags/interoperability.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [introduction-to-kotlin](<https://devfeed.tech/tags/introduction-to-kotlin.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-basics](<https://devfeed.tech/tags/kotlin-basics.md>), [kotlin-hyderabad-user-group](<https://devfeed.tech/tags/kotlin-hyderabad-user-group.md>), [kug-hyderabad](<https://devfeed.tech/tags/kug-hyderabad.md>), [language](<https://devfeed.tech/tags/language.md>), [learn](<https://devfeed.tech/tags/learn.md>), [null-safety](<https://devfeed.tech/tags/null-safety.md>), [patil](<https://devfeed.tech/tags/patil.md>), [siddhesh](<https://devfeed.tech/tags/siddhesh.md>), [siddhesh-patil](<https://devfeed.tech/tags/siddhesh-patil.md>), [siddhesh-patil-talks](<https://devfeed.tech/tags/siddhesh-patil-talks.md>), [talk](<https://devfeed.tech/tags/talk.md>), [talks-on-kotlin](<https://devfeed.tech/tags/talks-on-kotlin.md>), [tech-talks-in-hyderabad](<https://devfeed.tech/tags/tech-talks-in-hyderabad.md>), [tools](<https://devfeed.tech/tags/tools.md>), [val](<https://devfeed.tech/tags/val.md>)

### AI overview

A Kotlin User Group Hyderabad event page describing Siddhesh Patil's beginner-level introduction to Kotlin talk. The session covers Kotlin fundamentals, Android development, interoperability, tools, types, null-safety, functions, data classes, collections, control flow, classes, and interfaces.

### Source excerpt

At their monthly event, Siddhesh Patil gives a talk on introduction to Kotlin at Kotlin User Group Hyderabad

## The hidden pitfalls of the Elvis operator

DevFeed: [The hidden pitfalls of the Elvis operator](<https://devfeed.tech/articles/the-hidden-pitfalls-of-the-elvis-operator-25887.md>)

Original publisher: [Read original article](<https://medium.com/google-developer-experts/the-hidden-pitfalls-of-the-elvis-operator-da536ba68161?source=rss-1331e67af4e1------2>)

Author: Danny Preussler

Published: 2020-07-28T08:05:18Z

Content type: tutorial

Language: en

Sources: [Stories by Danny Preussler on Medium](<https://devfeed.tech/sources/stories-by-danny-preussler-on-medium.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>), [expression](<https://devfeed.tech/tags/expression.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [null-safety](<https://devfeed.tech/tags/null-safety.md>), [pitfalls](<https://devfeed.tech/tags/pitfalls.md>), [programming](<https://devfeed.tech/tags/programming.md>), [returning](<https://devfeed.tech/tags/returning.md>)

### AI overview

This Kotlin article explains that the Elvis operator can behave differently from an equivalent if/else statement when chained expressions are involved. Kotlin evaluates the full expression on the left, including the final function call, before deciding whether to evaluate the Elvis branch, so both functions may be called when the final expression returns null.

### Source excerpt

Hidden pitfalls when using Elvis operator I guess many of us love Elvis, both the artist and the operator in Kotlin. But it can lead to some hidden pitfalls if you are not aware of how it works. https://unsplash.com/photos/1LCzr14Ah5U I only realized recently when Vladimir Zdravkovic put some code on twitter and ask us to guess what it's printing: https://twitter.com/vlazdra/status/1287366531987406848?s=20 I assumed a hidden puzzle but I could not see the issue. I could not see any reason why this would print anything but it does! After thinking about the issue (Vladimir wrote an article about it) I found more and more cases where this could go wrong. But let me show you some code: Kotlin's null safety I think most of us love the way we can easily write null safe code with Kotlin like this: presenter?.onDestroy() or data?.let{ updateData(data) } And it is super easy to add an alternative case: data?.let{ updateData(data) } ?: run { showLoadingSpinner() }Let me ask you something Do you think the following code is basically the same as the above? if (data != null) { updateData(data) } else { showLoadingSpinner() } I'm sure most of us do think they are equivalent. But what if I told you, it's not? The if/else is totally binary, it's either-or. But with the Elvis operator, it might be both! To understand why we have to look closer to how it works. Other than the else that belongs explicit to an if , the Elvis operator is not tied to a single ?. Remember, we can chain them: someVariable?.someField?.doSomething() if we now add the Elvis operator here, it will get executed depending on the expression to its left side: someVariable?.someField?.doSomething() ?: run { doSomethingElse() } so if any expression in there is null, the Elvis block will get called. It will finish evaluating everything on the left before checking if the operator is needed. This includes the last expression. So this is depending on whatever doSomething() returns! If it is null, then the right side wil

## Kotlin: The Problem with \`null\`

DevFeed: [Kotlin: The Problem with \`null\`](<https://devfeed.tech/articles/kotlin-the-problem-with-null-29361.md>)

Original publisher: [Read original article](<https://arturdryomov.dev/posts/kotlin-the-problem-with-null/>)

Author: Artur Dryomov

Published: 2018-01-10T00:00:00Z

Content type: opinion

Language: en

Sources: [Artur Dryomov](<https://devfeed.tech/sources/artur-dryomov.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [RxJava](<https://devfeed.tech/topics/rxjava.md>), [Java](<https://devfeed.tech/topics/java.md>), [jetbrains](<https://devfeed.tech/topics/jetbrains.md>)

Tags: [bytecode](<https://devfeed.tech/tags/bytecode.md>), [errors](<https://devfeed.tech/tags/errors.md>), [java](<https://devfeed.tech/tags/java.md>), [jetbrains](<https://devfeed.tech/tags/jetbrains.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [null-safety](<https://devfeed.tech/tags/null-safety.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

The article examines Kotlin's null-safety guarantees and explains why Java interoperability can still allow runtime null-related crashes. Using an RxJava example, it argues that missing nullability metadata in Java bytecode prevents Kotlin's IDE and compiler from detecting the problem, while annotations can expose it during development.

### Source excerpt

I think almost everybody in the CS world knows about the Null References: The Billion Dollar Mistake talk. However, it does not really matter if the concept of null references a good idea or a really bad one. We live in the world where we just have to deal with null this way or another. Yep, just deal with it. So let's ask the "How" question instead of the "Why" one.

## Java Optionals and Kotlin Nulls

DevFeed: [Java Optionals and Kotlin Nulls](<https://devfeed.tech/articles/java-optionals-and-kotlin-nulls-25040.md>)

Original publisher: [Read original article](<https://typealias.com/guides/java-optionals-and-kotlin-nulls/>)

Author: author@typealias.com (Dave Leeds)

Published: 2017-09-01T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

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

Tags: [exception](<https://devfeed.tech/tags/exception.md>), [extension-function](<https://devfeed.tech/tags/extension-function.md>), [filter](<https://devfeed.tech/tags/filter.md>), [java](<https://devfeed.tech/tags/java.md>), [java-8](<https://devfeed.tech/tags/java-8.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [migration-guide](<https://devfeed.tech/tags/migration-guide.md>), [null](<https://devfeed.tech/tags/null.md>), [null-safety](<https://devfeed.tech/tags/null-safety.md>), [optional](<https://devfeed.tech/tags/optional.md>), [programming](<https://devfeed.tech/tags/programming.md>), [safe-call-operator](<https://devfeed.tech/tags/safe-call-operator.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>), [transformation](<https://devfeed.tech/tags/transformation.md>)

### AI overview

A guide to translating Java Optional usage into idiomatic Kotlin null-safety patterns. It compares creation, transformation, filtering, and conditional operations, while noting trade-offs and cases where Kotlin nullable types replace Optional.

### Source excerpt

When Java 8 introduced Streams for operating on collections of data, it also introduced a similar concept, Optional, which has many methods that are similar to Stream, but operates on a single value that might or might not be present. As you migrate your projects from Java to Kotlin, you might come across some Optional objects. What should you do? Should you leave them as Optional, or change them to more idiomatic Kotlin?

## 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.