public function marshal($value)
{
if ($this->options()->allowed && !in_array($value, $this->options()->allowed)) {
throw new \InvalidArgumentException(sprintf('Allowed values for this field are %s.', implode(', ', $this->options()->allowed)));
}
return new TypedValue((string) $value);
}