code: @SuppressWarnings("deprecation")
    public boolean acceptPage(@Nullable Page page, @NotNull InternalLinkResolverOptions options) {
      if (page == null) {
        return false;
      }
  
      // check for jcr:content node
      if (!page.hasContent()) {
        return false;
      }
  
      // check if page is valid concerning on/off-time (only in publish environment)
      if (RunMode.isPublish(slingSettings.getRunModes()) && !page.isValid()) {
        return false;
      }
  
      // check if page is acceptable based on link handler config
      if (!linkHandlerConfig.isValidLinkTarget(page)) {
        return false;
      }
  
      return true;
    }
docs: Check if a given page is valid and acceptable to link upon.
  @param page Page
  @param options Options
  @return true if link is acceptable