PsiType (@NotNull PsiDisjunctionType disjunctionType) { final List<PsiType> substituted = new SmartList<>(); for (PsiType component : disjunctionType.getDisjunctions()) { PsiType mapped = mapType(component); if (mapped == null) return null; substituted.add(mapped); } return disjunctionType.newDisjunctionType(substituted); }