Updated to reflect PR comments re: null and undefined return empty string, arrays and objects return what you'd expect