Swift unexpectedly found nil when there is actual value : <p>I have following code:</p>

<pre><code>class User {

    var listsDict : [String : List]!

    func addList (list : List) -&gt; Void {
        print(list.name)
        listsDict[list.name] = list
    }

    func listForName (name: String) -&gt; List? {
        return listsDict[name]
    }

}


class List {

    let name : String
    var movies : Set&lt;String&gt;

    init(name: String){
        self.name = name
        movies = Set&lt;String&gt;()
    }

    func printList (){
        print(movies)
    }

}

var list = List(name: "List")
list.movies = Set&lt;String&gt;(["LOTR", "SAW", "POC"])
list.printList()


var johny = User()
johny.addList(list: list)
</code></pre>

<p>When i call <code>johny.addList(list: list)</code> i got an error:</p>

<pre><code>unexpectedly found nil while unwrapping an Optional value
</code></pre>

<p>But there is a value. I created instance of list previously and even print in log name of list (and it successfully printed). Why i got an error?</p>
