docs: private static boolean isModuleLayer(final Object moduleLayer) {
          if (moduleLayer == null) {
              throw new IllegalArgumentException("ModuleLayer references must not be null");
          }
          for (Class<?> currClass = moduleLayer.getClass(); currClass != null; currClass = currClass
                  .getSuperclass()) {
              if (currClass.getName().equals("java.lang.ModuleLayer")) {
                  return true;
              }
          }
          return false;
      }