private function getUowScheduledTag($name, User $user = null)
    {
        $scheduledForInsert = $this->om->getUnitOfWork()->getScheduledEntityInsertions();
        foreach ($scheduledForInsert as $entity) {
            /** @var Tag $entity */
            if ($entity instanceof Tag
                && $name === $entity->getName()
                && $user === $entity->getUser()) {
                return $entity;
            }
        }

        return null;
    }