1) when comparing strings with const, it's recommended to put the const first. This way, you avoid possible NPE
2) I suggest to use a switch here; it would be more compact