Find x?.firstOrNull() calls
Proprietaryx?.firstOrNull() produces null either when x is null OR when x is empty — the two cases collapse. Use x?.firstOrNull() ?: default only when both null-cases should yield the same fallback.
org. openrewrite. kotlin. idiom. FindFirstOrNullOnNullableReceiver$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. idiom. FindFirstOrNullOnNullableReceiver$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.