In effetti, in alcuni casi potrebbe non andare ...

Forse e' meglio usare la

obj.GetType()