Codegen: Routine: input checking raises errors instead of assert