Correctly handle null pointers returned from Rust representing None