docs: void validateNewChild(IonValue child)
          throws ContainedValueException, NullPointerException,
                 IllegalArgumentException
      {
          if (child.getContainer() != null)            // Also checks for null.
          {
              throw new ContainedValueException();
          }
  
          if (child.isReadOnly()) throw new ReadOnlyValueException();
  
          if (child instanceof IonDatagram)
          {
              String message =
                  "IonDatagram can not be inserted into another IonContainer.";
              throw new IllegalArgumentException(message);
          }
  
          assert child instanceof IonValueLite
              : "Child was not created by the same ValueFactory";
  
          assert getSystem() == child.getSystem()
              || getSystem().getClass().equals(child.getSystem().getClass());
      }