Use HasValue for nullable instead of comparing to null.
- Added test for verify we throw if cursor is missing the timestamp.