I have occasionally found a need to identify whether the type of a given variable is a nullable type so that I know whether I need to also use the HasValue and Value methods to obtain its contained value. Here's a farily simple snippet of code to accomplish this.
VB.NET:
If type.IsGenericType AndAlso type.GetGenericTypeDefinition() = GetType(Nullable(Of )) Then
End If
C#:
if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)) {}