design-by-contract helpers