title: Nullable object must have a value in MVC4
body: <p>I have a Class which has an attribute which could be null or set to time date. I for this attribute i created a field of type Date time which could be null or Date time value.I am unable to check in view where date is set or not.
  Inside Model class I have a nullable DateTime attribute.</p>
  
  <pre><code> public DateTime? CollectionDate { get; set; }
  </code></pre>
  
  <p>In my view i and to check if data is set to any value or like this.</p>
  
  <pre><code>if( Model.CollectionDate.Value!=null){
          DateTime test = Model.CollectionDate.Value;
      }
  </code></pre>
  
  <p>But when i load view i give me exception Nullable object must have a value.
  how can i check in where date is set before or not</p>