Proper check of dataset length