check category index range