Edit: The code quotation is not needed and typeof can be used instead, see @Tomas Petricek's answer
You could use a code quotation to get the type from None
open Microsoft.FSharp.Reflection
let printType x =
let typeOfX = <@ x @>.Type
if not <| FSharpType.IsUnion(typeOfX) && (box x) = null then
printfn "the type is 'null'"
else
printfn "the type is %A" typeOfX
Your input:
printType 3 // the type is System.Int32
printType (Some(3)) // the type is Microsoft.FSharp.Core.FSharpOption`1[System.Int32]
printType None // the type is Microsoft.FSharp.Core.FSharpOption`1[System.Object]
printType null // the type is 'null'