public function getFirstValueByAttributeCodeAsString(string $code, $asTitle = true)
    {
        $attributeValue = $this->getFirstValueByAttributeCode($code);

        if (!$attributeValue) {
            return "";
        }

        $field = $asTitle ? 'title' : 'value';

        return $attributeValue->$field;
    }