def METHOD_NAME(self, typ: Optional[ModelArg], value: Any) -> Any:
    if typ is None:  # (autodetect)
        return self.Model._maybe_reconstruct(value)
    elif typ is int:
        return int(want_str(value))
    elif typ is float:
        return float(want_str(value))
    elif typ is Decimal:
        return Decimal(want_str(value))
    elif typ is str:
        return want_str(value)
    elif typ is bytes:
        return want_bytes(value)
    else:
        # type set to Model
        model = cast(ModelT, typ)
        return model.from_data(value, preferred_type=model)