public function offsetSet($name, $value)
    {
        if($this->offsetExists($name))
        {
            //Only filter if we have a value
            if($value !== null)
            {
                if($value !== '')
                {
                    //Only accepts scalar values and array
                    if(!is_scalar($value) && !is_array($value))
                    {
                        throw new UnexpectedValueException(
                            'Value needs to be an array or a scalar, "'.gettype($value).'" given'
                        );
                    }

                    $filter = $this->_data[$name]->filter;

                    if(!($filter instanceof KFilterInterface)) {
                        $filter =  $this->getObject('filter.factory')->createChain($filter);
                    }

                    $value = $filter->sanitize($value);
                }
                else $value = null;
            }

            $this->_data[$name]->value = $value;
        }
    }