code: private void checkTaglet(Object taglet) {
          if (taglet instanceof Taglet) {
              checkTagName(((Taglet) taglet).getName());
          } else if (taglet instanceof jdk.javadoc.doclet.Taglet) {
              jdk.javadoc.doclet.Taglet legacyTaglet = (jdk.javadoc.doclet.Taglet) taglet;
              customTags.remove(legacyTaglet.getName());
              customTags.put(legacyTaglet.getName(), new UserTaglet(legacyTaglet));
              checkTagName(legacyTaglet.getName());
          } else {
              throw new IllegalArgumentException("Given object is not a taglet.");
          }
      }
docs: Check the taglet to see if it is a legacy taglet.  Also
  check its name for errors.