Switch like statements for any object inherited from id