Getting a NullReferenceException when trying to compare to null : <p>first time posting on here and a bit of a noob in c#. Basically I'm creating a linkedlist and initializing it to null at the beginning of my class. When I'm ready to use it, I check to make sure that it's not equal to the string passed by the method. I immediately get a NullReferenceException, and i'm supposed to be comparing it to null. Any fixes?</p>

<pre><code>private DoubleLinkedListCell&lt;DoubleLinkedListCell&lt;GamePiece&gt;&gt; _columns = null;

public void FindColumn(string columnId)
    {

        bool right = true;
        while (_columns.Id != columnId)
        {
            if (_columns.Next == null)
            {
                right = false;
            }
            if (right)
            {
                Columns = Columns.Next;
            }
            else
            {
                Columns = Columns.Prev;
            }
        }

    }
</code></pre>
