At a previous job, we introduced a simple Optional generic type, with JSON implementation, and it pretty much solved uncertain nil issues. Sometimes the solution is simple and boring.
Doesn't this lead to an unstuctured data problem?
This is exactly how Rust works, except there it's built into the compiler, and there's no such as nil in most code.