docs: @SuppressWarnings("unchecked")
      public static <T> T asType(YamlNode node, Class<T> type) {
          if (node != null && !type.isAssignableFrom(node.getClass())) {
              String nodeName = node.nodeName();
              throw new YamlException(String.format("Child %s is not a %s, it's actual type is %s", nodeName, type.getSimpleName(),
                      node.getClass().getSimpleName()));
          }
          return (T) node;
      }