pass plain string to custom formatter; omit undefined formatting output

patch for #3 that should be backwards compatible

also omits any `undefined` formatter output