improve handling in DoubleConfirm.prototype.format when parameter is a function