function ensureBuffer(o) {
    if (Buffer.isBuffer(o)) {
        return o;
    } else if (typeof o === "object") {
        o = JSON.stringify(o);
    } else if (typeof o !== "string") {
        o = ""+o;
    }
    return Buffer.from(o);
}
Converts the provided argument to a Buffer, using type-dependent
methods.

@param  {any}    o - the property to convert to a Buffer
@return {String} the Buffer version
@memberof @node-red/util_util