Lets say you have a generic function called "SafeToString". The purpose is to be able to pass anything in and always get back a sane response without any exceptions. How would you want it to respond to these inputs?
- Null -> Null or String.Empty
- DBNull.Value -> Null, String.Empty, or some text like ""
- Nullable containing a null -> Null, String.Empty, or some text like ""
- FSharpOption containing None -> Null, String.Empty, or "None"
- FSharpOption containing Some(5)-> "5" or "Some(5)"