add prepare_value so that the field can be properly serialized when used
outside a model context