function toStringArray(x) {
    if (Array.isArray(x)) {
        return x.map(String)
    }
    return []
}
Ensures the given value is a string array.

@param {any} x - The value to ensure.
@returns {string[]} The string array.