Check if there are samples before processing them