Renamed hasChildren function to setHandler.