Don’t assert the result of sp_env()

Just gracefully return `NULL` instead.

I'd like to revisit the tests and possibly use our own `assert` macro.