     /// Insert a word into the graph, words must be inserted in order.
     /// - parameter word: Word to insert.
     public func insert(word: String) {
-        if word == "" { return }
-        assert(previousWord == "" || previousWord < word, "Words must be inserted alphabetically")
+        assert(previousWord == "" || (previousWord != "" && previousWord < word))
         
         // Find common prefix for word and previous word.
+        let chars = Array(word.characters)
         var commonPrefix = 0
-        let chars = Array(word.characters)
-        let previousChars = Array(previousWord.characters)
         for i in 0..<min(chars.count, previousChars.count) {
             if chars[i] != previousChars[i] { break }
             commonPrefix++

    /// - parameter downTo: Iterate from count to this number (truncates these items).
    private func minimize(downTo: Int) {
        for i in (downTo..<uncheckedNodes.count).reverse() {
            let (_, letter, child) = uncheckedNodes[i]
            if let minNode = minimizedNodes[child] {
                uncheckedNodes[i].parent.setEdge(letter, node: minNode)
            } else {
                minimizedNodes[child] = child
            }

        
        // Add the suffix, starting from the correct node mid-way through the graph.
        var node = uncheckedNodes.last?.child ?? rootNode
        chars[commonPrefix..<chars.count].forEach {
            let nextNode = DawgNode()
            node.edges[$0] = nextNode
            uncheckedNodes.append((node, $0, nextNode))
            node = nextNode
        }
        
        previousWord = word
        previousChars = chars
        node.final = true
    }
    
    /// - parameter word: Word to check.
