private static @Nullable PsiElement getIdentifier(@Nullable PsiElement element) {
      PsiNameIdentifierOwner namedElement = ObjectUtils.tryCast(element, PsiNameIdentifierOwner.class);
      if (namedElement == null) return null;
      return namedElement.getNameIdentifier();
    }
private static @Nullable PsiElement getIdentifier(@Nullable PsiElement element)