title: How to check in linq if the list is null?
body: <p>i am binding a checked list box with following ling that retrun a list list, but if the list is empty how should i manage it?
  It throws exception in the ling statment and if null what should i set for checkedlist box</p>
  
  <pre><code>public List&lt;dataObject&gt; GetAllCustomItems(CategoryType currType, int mCategoryID)
          {
              List&lt;dataObject&gt; lst = null;
              try
              {
                  switch (currType)
                  {
                      case CategoryType.Dressing:
                          lst = (from xx in this.DressingItems 
                                 where xx.DressingInfo.CatID == mCategoryID 
                                 select new dataObject() { 
                                     ID = xx.DressingInfo.DressingID,
                                     Name = xx.DressingInfo.Description, 
                                     Selected = xx.IsDefault 
                                 }).ToList();
                          break;
                }
          }
  </code></pre>
  
  <p>It throws exception </p>
  
  <pre><code>Value cannot be null.
  Parameter name: source
  </code></pre>