title: Xcode Playground bug? "fatal error: Can't form a Character from an empty String"
body: <p>With the following code, I get <code>fatal error: Can't form a Character from an empty String</code> in the Console. I don't see where or what I'm doing wrong.</p>
  
  <pre><code>class Solution {
    func isValid(_ s: String) -&gt; Bool {
      var dictionary = [Character: Character]()
      dictionary["("] = ")"
      dictionary["{"] = "}"
      dictionary["["] = "]"
  
      for (i, character) in s.characters.enumerated() {
        if i % 2 == 0 {
          if let idx = s.index(s.startIndex, offsetBy: i + 1, limitedBy: s.endIndex) {
            if dictionary[character] != s[idx] {
              return false
            }
          }
        }
      }
  
      return true
    }
  }
  
  var sol = Solution()
  let test = "()[]["
  print(sol.isValid(test))
  </code></pre>
  
  <p>Xcode 8.3.2
  Swift 3+</p>