Fix for issue #156

Added a utility function to parse a string to a DateTime option, and used this to check for invalid headers.

I have no idea how to write a test for this, although I suspect we probably should.
introducing `foundCtx` seems unnecessary