Applying Design by Contract – adding validation