# Effective Kotlin Item 7: Prefer a nullable or Result result type when the lack of a result is possible

DevFeed: [Effective Kotlin Item 7: Prefer a nullable or Result result type when the lack of a result is possible](<https://devfeed.tech/articles/effective-kotlin-item-7-prefer-a-nullable-or-result-result-type-when-the-lack-of-a-result-is-possible-39285.md>)

Original publisher: [Read original article](<https://kt.academy/article/ek-nullable-result>)

Published: 2022-10-19T00: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>), [exceptions](<https://devfeed.tech/topics/exceptions.md>), [Exception](<https://devfeed.tech/topics/exception.md>)

Tags: [avoid](<https://devfeed.tech/tags/avoid.md>), [exception](<https://devfeed.tech/tags/exception.md>), [exceptions](<https://devfeed.tech/tags/exceptions.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

## AI overview

This Kotlin article explains when to return nullable or Result types and when to throw exceptions. It recommends explicit return types for expected failures because they are clearer and more efficient to handle, while exceptions should be reserved for unexpected or exceptional conditions. It also notes reasonable uses of exceptions in some backend and Android processing patterns.

## Source excerpt

Why should we prefer to avoid throwing exceptions and using types to our advantage.