Looks like it would be pretty easy to do something similar in D with either unions or Algebraic. The time-consuming part would be making sure everything works seamlessly with mathematical functions.
[1] https://julialang.org/blog/2018/06/missing[2] https://www.reddit.com/r/programming/comments/8spmca/firstclass_statistical_missing_values_support_in/
