Turn some error conditions into assertions (part 4)