protected function findBaseRootElementOrNull()
    {
        $qb = parent::createBaseQueryBuilder();

        $qb->andWhere($qb->getRootAliases()[0] . '.isRoot = 1');
        $qb->andWhere($qb->getRootAliases()[0] . '.parent IS NULL');

        $root = $qb->getQuery()->getOneOrNullResult();

        return $root;
    }