code: public static Object convert(Object value, PrimitiveTypeInfo typeInfo) {
      if (value == null) {
        return null;
      }
      if (value instanceof String) {
        return CONVERTER.convert((String) value, type(typeInfo));
      }
      return value;
    }
docs: Attempts to convert the input value into the target type. If the input value is {@code null} then {@code null} is
  returned. If the input value is a String then an attempt is made to convert it into the target type. If the input
  value is not a {@link String} then it is assumed the user has explicitly chosen the required type and no attempt is
  made to perform a conversion. This may result in Hive throwing an error if the incorrect type was chosen.
  
  @param value The input value.
  @param typeInfo The target Table's column type.