Fix to typecheck in 6.1.1

`raise` now requires a more specific type.