What's wrong with the solution that
void some_function(Foo? f) {
is converted to
void some_function(Foo f, string filename = __FILE__, uint line =
__LINE__) in {
assert(f !is null, std.string.format("Null Object @ File %s
on Line %d.", filename, line));
} body {
? It isn't a huge effort for the compiler, or?