code: public final Optional<Expression> getSoyTypeAssertion(
        Expression value, String valueName, Generator codeGenerator) {
      Optional<Expression> typeAssertion = getTypeAssertion(value, codeGenerator);
      if (!typeAssertion.isPresent()) {
        return Optional.absent();
      }
  
      return Optional.of(
          SOY_ASSERTS_ASSERT_TYPE.call(
              typeAssertion.get(), stringLiteral(valueName), value, stringLiteral(typeExpr())));
    }
docs: Returns a Soy assertion expression that asserts that the given value has this type, or {@link
  Optional#absent()} if no assertion is necessary.