syntax to get the type of collider

Should it not work if I write as follow: print(collider.GetType()) from that I should expect to have the type of collider that is tested?

First off, you probably want:

collider.GetType().ToString();

instead, since `GetType()` returns a `Type` not a `string`. Secondly, yes, this should return one of the following collider types:

BoxCollider, SphereCollider, CapsuleCollider, or MeshCollider

It should be printed exactly like that ("BoxCollider", not "Box").