You would need a small function:
Function VarType(val as Variant) As Integer
This returns you a TypeCode for the passed Variable.
Quoted from the Language reference:
From Real Software Documentation
MethodVariant.Type ( ) As Integer
Returns an Integer, indicating the data type of the Variant. The values of each data type are given in the table in the Notes section of the VarType function.
If the Variant is an array, then Type returns TypeArray logically OR'ed with the array element type. You can get the element type by calling ArrayElementType.
An array of Dates will be designated as an array of Objects.
If the Variant is not Nil, it provides the same functionality as the VarType global function. You can use the Variant class constants instead of the integer values to determine the data type. The names are listed as Class Constants on the Variant page.