Fixed issue with Date type not accepting Date objects. Added test.