@Contract("null, _ -> null")
    public static Java8MigrationUtils.MapCheckCondition fromConditional(PsiElement conditional, boolean treatGetNullAsContainsKey) {
      if (conditional instanceof PsiIfStatement ifStatement) {
        return tryExtract(ifStatement.getCondition(), ifStatement, treatGetNullAsContainsKey);
      }
      if (conditional instanceof PsiConditionalExpression ternary) {
        PsiElement parent = ternary.getParent().getParent();
        return tryExtract(ternary.getCondition(), parent instanceof PsiStatement ? (PsiStatement)parent : null, treatGetNullAsContainsKey);
      }
      return null;
    }
@Contract("null, _ -> null")
    public static Java8MigrationUtils.MapCheckCondition fromConditional(PsiElement conditional, boolean treatGetNullAsContainsKey)