The Is
operator is valid but not in the context you are trying to use it.
From the VbScript Reference
Compares two object reference variables.
result = object1 Is object2
If you where setting an object reference using the Set
command then using this kind of comparison would be acceptable.
In this case though your Session("ordertype")
contains a string which is not an object reference type, instead use a simple Len()
check to check whether you have assigned a string or not. To avoid Nulls use
'Check Length of Session value avoid Null by concatenating empty string.
If Len(Session("ordertype") & "") > 0 Then
'Do Stuff here
End If
Alternative Method
You can also use VarType(Session("ordertype"))
to check your Session variable type first to avoid Nulls as @ZeeTee suggests.