private static boolean isWellFormedIf(@Nullable PsiElement e) {
    return e instanceof PsiIfStatement ifStatement && ifStatement.getCondition() != null && ifStatement.getThenBranch() != null;
  }
private static boolean isWellFormedIf(@Nullable PsiElement e)