Simplify the category depth level check