exiting when invalid value is passed in as a date

@triblondon @AlbertoElias 

addresses https://github.com/Financial-Times/o-date/issues/19
toDate now returns undefined if the date passed in can't be used to generate a valid Date object. So now the final line checks date is defined before trying to render