The TypeOf keyword introduces a comparison clause that tests whether an object is derived from or implements a particular type, such as an interface.
The TypeOf keyword is used in this context:
If...Then...Else Statements
Comparison Operators | Object Variable Values | Determining Object Type