private static @Nullable PsiElement getTypeElement(@NotNull UField field) {
      UTypeReferenceExpression typeReference = field.getTypeReference();
      PsiElement typeReferencePsi = typeReference == null ?
                                    null :
                                    typeReference.getSourcePsi();

      return typeReferencePsi instanceof PsiTypeElement ?
             getFirstKey(((PsiTypeElement)typeReferencePsi)) :
             typeReferencePsi;
    }
private static @Nullable PsiElement getTypeElement(@NotNull UField field)