protected function createAttributeInstance(ModelInterface $model = null)
    {
        if (null === $model) {
            return null;
        }

        return $this->attributeFactory->createAttribute(
            $model->getPropertiesAsArray(),
            $this->getMetaModelByModelPid($model)
        );
    }