verifys the categery and subcategorie is already selected or not