title: Nullable object must have a value
body: <p>Am getting this error when l tried to add data in my project.it point me to this code:</p>
  
  <pre><code>var currentuserid = WebSecurity.CurrentUserId;
  var user = db.UserProfiles.SingleOrDefault(u =&gt; u.UserId == currentuserid);
  List&lt;Claim&gt; claims = db.Claims.Include("Claim_Status").Include("Patient").Include("Hospital").ToList();
  var userClaims = claims.Where(c =&gt; c.Hospitalid.Value == user.Hospitalid);
  return View(userClaims.ToList());
  </code></pre>
  
  <p>how can l solve this problem.</p>
  
  <p>am using Microsoft sql server 2008.</p>