protected function setIfDefined($object, $field)
    {
        $propertyAccessor = $this->getPropertyAccessor();
        if (!$this->_has($field)) {
            return $propertyAccessor->isReadable($object, $field) ?
                $propertyAccessor->getValue($object, $field) :
                null
            ;
        }

        $propertyAccessor->setValue(
            $object,
            $field,
            $value = $this->_get($field)
        );

        return $value;
    }