function isEmptyString(str) {
    return str.trim() === ""
}
Checks if a given string is empty or only contains whitespace characters.

@param {string} str - The string to check.
@returns {boolean} True if the string is empty or only contains whitespace, false otherwise.