@NotNull public Type typeToType(@Nullable PsiType type) { if (type == null) return Type.EMPTY_TYPE; TypeVisitor typeVisitor = new TypeVisitor(this); type.accept(typeVisitor); return typeVisitor.getResult(); }