ModCommand (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { GrExpression expression = pointer.getElement(); if (expression == null) return ModCommand.nop(); return ModCommand.psiUpdate(expression, e -> { if (mySafe) { doSafeCast(project, myExpectedType, e); } else { doCast(project, myExpectedType, e); } }); }