/// <summary>
 /// Writes the nullable boolean.
 /// </summary>
 public static void WriteTimeSpanAsLongNullable(this BinaryWriter writer, TimeSpan?value)
 {
     if (value != null)
     {
         writer.WriteBoolean(true);
         writer.WriteTimeSpanAsLong(value.Value);
     }
     else
     {
         writer.WriteBoolean(false);
     }
 }