Ensure string switches are not treated as booleans, closes #2218