SERVER-13760 Do not call dateToISOString if date is not formatable