public function setAttribute($key, $value)
    {
        if ($value !== null && $this->isSerializeCastable($key)) {
            $value = $this->asSerialize($value);
        }

        return parent::setAttribute($key, $value);
    }