To avoid Run-time Error 94 (Invalid Use of Null) when using type conversion functions, "protect" them by concatenating "default" values where logically possible. Suppose that g_varReturn is a variant. We can use type conversion functions on g_varReturn with the forms:
<variable of type Double> = CDbl(0 & g_varReturn)
<variable of type String> = CStr(g_varReturn & "")
<variable of type String> = CStr(g_varReturn & Empty)
Note that in the CDbl() example above the zero is concatenated in front of g_varReturn. Do not concatenate the zero after g_varReturn!