Perform input verification (the hard way, using assert)