How to determine the type of a component?

How to determine the type of a component?

WL.Component has .type, but you rarely need that