Change `type({a}) == 1` to `type({a}) == type('')`