use hasData() instead of removed getRootObjectsCount()> 0