boolean (@Nullable final PsiElement e) { if (e == null) { return false; } final PsiElement element = normalizeElement(e); if (element == null || !element.isWritable()) { return false; } final PsiType type = TypeMigrationLabeler.getElementType(element); if (type != null) { final PsiType elementType = type instanceof PsiArrayType ? type.getDeepComponentType() : type; if (elementType instanceof PsiPrimitiveType) { return !elementType.equals(PsiTypes.voidType()); } if (elementType instanceof PsiClassType) { final PsiClass aClass = ((PsiClassType)elementType).resolve(); return aClass != null; } else if (elementType instanceof PsiDisjunctionType) { return true; } } return false; }