public @NotNull PsiElement retrieveOrThrow() {
    PsiElement element = retrieve();
    if (element == null) {
      String msg;
      if (this instanceof StubIndexReference) {
        msg = ((StubIndexReference)this).diagnoseNull();
      }
      else {
        msg = "Anchor hasn't survived: " + this;
      }
      throw new PsiInvalidElementAccessException(null, msg);
    }

    return element;
  }
public @NotNull PsiElement retrieveOrThrow()