We should replace the `unsafe` `new_unchecked` with `new` and use `ok_or_else` to propagate errors back. (Discovered during audit related to #363)