Check category id is valid