title: Value cannot be null, r nparameter name source
body: <p>I am confused. I have two statements that are the same and one works and the other receives the error - <em>value cannot be null. r nparameter name source.</em> From what I read I am receiving the error because something is null in my linq expression. However from what I can tell nothing is null.</p>
  
  <p>The first if statement works. When a person selects 'Select' from a list of Burn Project a list of BurnPiles is displayed below the BurnProject list. (this works). Then when a person selects 'Select' from the list of BurnPiles a list of RequestedBurns is display below it. This gives me the null error. At one time it did work now it doesn't. </p>
  
  <p>I am at a loss of what went wrong. I do know the RequestedBurn Table starts at record #2 but that shouldn't have anything to do with it. The BurnPile records that I have been using have associated RequestedBurns.</p>
  
  <pre><code>        //when 'Select' is chosen from the list of burn projects the list of burn piles 
          //associated with that specific burn project is display below it.
          if (burnerID != null)
          {
              ViewBag.BurnerID = burnerID.Value;
              viewModel.BurnPiles = viewModel.BurnProjects.Where(
                  b =&gt; b.BurnerID == burnerID.Value).Single().BurnPiles;
          }
  
          //when 'Select' is chosen from the list of burn piles the list of requested 
          //burns associated with that specific burn pile is displayed below it.
          if (burnPileID != null)
          {
              ViewBag.BurnPilesID = burnPileID.Value;
              viewModel.RequestedBurns = viewModel.BurnPiles.Where(
                  x =&gt; x.BurnPilesID == burnPileID).Single().RequestedBurns;
  
          }
  </code></pre>