private static @Nullable List<OperationRecord> extractRecords(@NotNull FunctionHelper fn) {
    PsiMethodCallExpression chainExpression = tryCast(fn.getExpression(), PsiMethodCallExpression.class);
    if (chainExpression == null) return null;
    List<Operation> operations = OptionalToIfInspection.extractOperations(chainExpression, false);
    if (operations == null || operations.isEmpty()) return null;
    return OptionalToIfInspection.createRecords(operations);
  }
private static @Nullable List<OperationRecord> extractRecords(@NotNull FunctionHelper fn)