Use coalesce expression

Proprietary

Replace x != null ? x : y and x == null ? y : x with x ?? y.

OpenRewrite.Recipes.CSharp.CodeQuality.Simplification.UseCoalesceExpression
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Simplification.UseCoalesceExpression

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