function assertNonEmptyString(key) {
    if (typeof key !== "string" || key.length === 0) {
        throw new TypeError("Key must be a non-empty string.");
    }
}
Checks that a key is a non-empty string.
@param {string} key The key to validate.
@returns {void}
@throws {TypeError} When the key is either not a string or is an empty
     string.