Fix a problem saving null dates