Find if (x != null) x.foo() that could use ?.

Proprietary

An if (x != null) x.foo() ladder reads as a manual nullable dispatch where Kotlin already has x?.foo(). The safe-call form is shorter and folds into expression position, where the if cannot.

org.openrewrite.kotlin.idiom.FindIfNotNullThenCall$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.idiom.FindIfNotNullThenCall$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.