public static boolean isReferenceWithoutQualifier(@Nullable PsiElement element, @NotNull String name) {
    if (!(element instanceof GrReferenceExpression ref)) return false;

    return !ref.isQualified() && name.equals(ref.getReferenceName());
  }
public static boolean isReferenceWithoutQualifier(@Nullable PsiElement element, @NotNull String name)