Restored if-else as switch on string is not supported in 1.6