Improve support for date properties

The date type didn't correctly handle invalid/null dates