Turn some error conditions into assertions (part 2)