code: public static boolean isNumericPrimitive(SoyType type) {
      SoyType.Kind kind = type.getKind();
      if (NUMERIC_PRIMITIVES.contains(kind)) {
        return true;
      }
      return type.isAssignableFrom(NUMBER_TYPE) || NUMBER_TYPE.isAssignableFrom(type);
    }
docs: Returns true if the input type is a numeric primitive type, such as int, float, proto enum, and
  number.