'Coerce values according to their explicit type'

def set_explicit_value(self, value=None, data_type=TYPE_STRING):

    if (data_type not in self.VALID_TYPES):
        raise ValueError(('Invalid    data    type:    %s' % data_type))
    if isinstance(value, STRING_TYPES):
        value = self.check_string(value)
    self._value = value
    self.data_type = data_type
