title: show error message when model.item is null
body: <p>I am displaying two partial views in a View. The partial views are displayed well. 
  But if the model value is null, how to show error message in my Partial View.
  Below is my code : </p>
  
  <p>Controller: </p>
  
  <pre><code>  public ActionResult MyAccount(string email)
          {
              OrderModel objorder = new OrderModel();
              var OrderDetails = objorder.GetOrderInfo(email);
              if(OrderDetails == null)
              {
                 // ViewBag.Message = "You have not placed any orders.";
                  ModelState.AddModelError("NoOrders", "You have not placed any orders.");
                  return View();
              }
              CustomerModel objcustomer = new CustomerModel();
              var CustomerDetails =  objcustomer.GetCustomerInfo(email);            
              return View(Tuple.Create(OrderDetails, CustomerDetails));
          }
  </code></pre>
  
  <p>View </p>
  
  <pre><code>@model Tuple&lt;IList&lt;MvcApplication1.Models.OrderModel&gt;, IList&lt;MvcApplication1.Models.CustomerModel&gt;&gt;
  
  @Html.Partial("MyOrders")&lt;br/&gt;
  @Html.Partial("AccountInfo")
  </code></pre>
  
  <p>Partial View 1
  @model Tuple, IList></p>
  
  <pre><code> @using (Html.BeginForm())
      {   
          if (Model.Item1 != null) // Null reference unhandled by user code 
          {
              &lt;div&gt;
                @foreach(var item in Model.Item1)
                {
                 @Html.DisplayFor(model =&gt; item.OrderID) 
                }
              &lt;/div&gt;
          }
          else
          {
             &lt;p&gt;@Html.ValidationMessage("NoOrders", new { @class = "msg" })&lt;/p&gt;
          }
      }
  </code></pre>
  
  <p>I have passed the validation message for null values to handle in Partial View1.
  But I am getting object reference not set and null reference unhandled message.<br/>
  What is the mistake in my code.? Any suggestions will be helpful </p>