Change to:
<?php if ($displayData->get('children') && $displayData->maxLevel != 0 && $params->get('show_empty_categories') != 0) : ?>