/**
  * Get one of theme domain models
  *
  * @param int|null $type
  * @return \Magento\Theme\Model\Theme\Domain\Virtual|\Magento\Theme\Model\Theme\Domain\Staging
  * @throws \InvalidArgumentException
  */
 public function getDomainModel($type = null)
 {
     if ($type !== null && $type != $this->getType()) {
         throw new \InvalidArgumentException(sprintf('Invalid domain model "%s" requested for theme "%s" of type "%s"', $type, $this->getId(), $this->getType()));
     }
     return $this->_domainFactory->create($this);
 }