@Override
  public @Nullable PsiType visitIntersectionType(@NotNull PsiIntersectionType intersectionType) {
    final List<PsiType> substituted = new SmartList<>();
    for (PsiType component : intersectionType.getConjuncts()) {
      PsiType mapped = mapType(component);
      if (mapped == null) return null;

      substituted.add(mapped);
    }
    return PsiIntersectionType.createIntersection(false, substituted.toArray(PsiType.EMPTY_ARRAY));
  }
@Override
  public @Nullable PsiType visitIntersectionType(@NotNull PsiIntersectionType intersectionType)