I want to check if an object is not of a particular type. I know how to check if something is of a particular type:
if (t is TypeA) { ... }
I usually stick the null and type checking all in one line:
if (t == null || !(t is TypeA)) { ... }
If TypeA is a struct, you'll need to handle it slightly differently again:
if (t == null || t.GetType() != typeof(TypeA)) { ... }