public @Nullable PsiElement getTargetElement(@Nullable PsiElement context, @Nullable String url) {
    Pair<@NotNull PsiElement, @Nullable String> target = getTarget(context, url);
    return target == null ? null : target.first;
  }
public @Nullable PsiElement getTargetElement(@Nullable PsiElement context, @Nullable String url)