PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project);
String stream = generateStream(iteratedValue, tb.getLastOperation()).append(".findFirst()").toString();
if (statement instanceof PsiReturnStatement) {
PsiReturnStatement returnStatement = (PsiReturnStatement)statement;
PsiExpression value = returnStatement.getReturnValue();
<BUG>if (value == null) return;
</BUG>
PsiReturnStatement nextReturnStatement = StreamApiMigrationInspection.getNextReturnStatement(foreachStatement);
<BUG>if (nextReturnStatement == null) return;
</BUG>
PsiExpression orElseExpression = nextReturnStatement.getReturnValue();

PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project);
String stream = generateStream(iteratedValue, tb.getLastOperation()).append(".findFirst()").toString();
if (statement instanceof PsiReturnStatement) {
PsiReturnStatement returnStatement = (PsiReturnStatement)statement;
PsiExpression value = returnStatement.getReturnValue();
if (value == null) return null;
PsiReturnStatement nextReturnStatement = StreamApiMigrationInspection.getNextReturnStatement(foreachStatement);
if (nextReturnStatement == null) return null;
