Checking when delete category fixed

Added checking for sub-categories when user tries to delete category.