Gets a value indicating whether the current Nullable`1 object has a valid value of its underlying type.
true if the current instance contains a value; otherwise false.
If the Nullable`1.HasValue property is true, the value of the current Nullable`1 object can be accessed with the Nullable`1.Value property. Otherwise, attempting to access its value throws an InvalidOperationException exception.