code: public SoyExpression coerceToBoolean() {
      // First deal with primitives which don't have to care about null.
      if (BytecodeUtils.isPrimitive(resultType())) {
        return coercePrimitiveToBoolean();
      }
      if (soyType().equals(NullType.getInstance())) {
        return FALSE;
      }
      if (delegate.isNonNullable()) {
        return coerceNonNullableReferenceTypeToBoolean();
      } else {
        // If we are potentially nullable, then map null to false and run the normal logic recursively
        // for the non-nullable branch.
        final Label end = new Label();
        return withSource(
                new Expression(delegate.resultType(), delegate.features()) {
                  @Override
                  protected void doGen(CodeBuilder adapter) {
                    delegate.gen(adapter);
                    adapter.dup();
                    Label nonNull = new Label();
                    adapter.ifNonNull(nonNull);
                    adapter.pop();
                    adapter.pushBoolean(false);
                    adapter.goTo(end);
                    adapter.mark(nonNull);
                  }
                })
            .asNonNullable()
            .coerceToBoolean()
            .labelEnd(end);
      }
    }
docs: Coerce this expression to a boolean value.