Only test if it is undefined, and permit casting of non-string values in Date.prototype.toYMD().
Only test if it is undefined, and permit casting of non-string values in
Date.prototype.toYMD().

JerrySievert/date-utils