use the type of the switch variable for determining else clause type