docs: protected void checkType(Object object) {
          if (object == null) {
              throw new NullPointerException("Sequences cannot contain null, use a List instead");
          }
          if (type != null) {
              if (!type.isInstance(object)) {
                  throw new IllegalArgumentException(
                          "Invalid type of argument for sequence of type: "
                                  + type.getName()
                                  + " cannot add object: "
                                  + object);
              }
          }
      }