Use J.Literal.isLiteralValue(expression, null)
MSALReplace expression instanceof J.Literal && ((J.Literal) expression).getValue() == null with J.Literal.isLiteralValue(expression, null).
org. openrewrite. java. recipes. IsLiteralNullRecipemod run . --recipe= org. openrewrite. java. recipes. IsLiteralNullRecipeInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.