Replacement of empty() method by assertion.