code: public function checkRootType($varValue, Contao\DataContainer $dc)
  	{
  		if ($varValue != 'root' && $dc->activeRecord->pid == 0)
  		{
  			throw new Exception($GLOBALS['TL_LANG']['ERR']['topLevelRoot']);
  		}
  
  		return $varValue;
  	}
docs: Make sure that top-level pages are root pages
  
  @param mixed                $varValue
  @param Contao\DataContainer $dc
  
  @return mixed
  
  @throws Exception