On the line: bool travel = fill.travel.Value;
I am getting the following error:
Nullable object must have a value
a
You can check if nullable variable has some value like this before your actually access its value
if(fill.travel.HasValue)
{
bool travel = fill.travel.Value;
}
I had this happen because there was code like this:
bool? someVariable = (bool)someNullableBool;
The someNullableBool was null and this error was thrown.
The solution was to re-write it as:
bool? someVariable = (bool?)someNullableBool;