Remove the usage of String in switch.