Replace assert by simpler but equivalent calls.