Fix a bug in util.formatISODateTime

It would crash with a TypeError when passed anything that was not
an instanceof Date.

Anything that's not a Date gets a formatted date/time string of
empty string.