code: private static boolean isDefinitePrimitive(SoyType type) {
      return type.getKind() == SoyType.Kind.BOOL
          || isNumericPrimitive(type)
          || type.getKind().isKnownStringOrSanitizedContent();
    }
docs: Returns true if the input type is a primitive type. This includes bool, int, float, string and
  all sanitized contents. Two special cases are proto enum and number: these are proto or
  aggregate type in Soy's type system, but they should really be treated as primitive types.