code: public SoyExpression box() {
      if (isBoxed()) {
        return this;
      }
      if (soyType().equals(NullType.getInstance())) {
        if (delegate == NULL) {
          return NULL_BOXED;
        }
        return asBoxed(toStatement().then(NULL_BOXED));
      }
      // since we aren't boxed and these must be primitives so we don't need to worry about
      // nullability
      if (soyRuntimeType.isKnownBool()) {
        return asBoxed(MethodRef.BOOLEAN_DATA_FOR_VALUE.invoke(delegate));
      }
      if (soyRuntimeType.isKnownInt()) {
        return asBoxed(MethodRef.INTEGER_DATA_FOR_VALUE.invoke(delegate));
      }
      if (soyRuntimeType.isKnownFloat()) {
        return asBoxed(MethodRef.FLOAT_DATA_FOR_VALUE.invoke(delegate));
      }
      // If null is expected and it is a reference type we want to propagate null through the boxing
      // operation
      final boolean isNonNullable = delegate.isNonNullable();
      return asBoxed(
          new Expression(soyRuntimeType.box().runtimeType(), features()) {
            @Override
            protected void doGen(CodeBuilder adapter) {
              Label end = null;
              delegate.gen(adapter);
              if (!isNonNullable) {
                end = new Label();
                BytecodeUtils.nullCoalesce(adapter, end);
              }
              doBox(adapter, soyRuntimeType.asNonNullable());
              if (end != null) {
                adapter.mark(end);
              }
            }
          });
    }
docs: Returns a SoyExpression that evaluates to a subtype of {@link SoyValue}.