docs: public static Optional<ElementKind> resolveKind(Element element, ElementKind expected) {
          final Optional<ElementKind> elementKind = resolveKind(element);
          if (elementKind.isPresent() && elementKind.get() == expected) {
              return elementKind;
          }
          return Optional.empty();
      }