How do we get the object type ?

for instance,

if we got a function c(d as object) where d is any object.

how can we determine the type of object, whether it is textbox, label, etc

thanks.