T is a type parameter. If your previousLookupObject is a Type object, you need to do typeof(T) == previousLookupObject .
If previousLookupObject is a variable of type T , you need to have the actual object T to compare it with.
If you want to know if the previousLookupObject type is of type T , you need to use the is : if (previousLookupObject is T) .
Femaref
source share