static boolean isValidKey(@Nullable String key) {
        if (key == null || key.isEmpty()) {
            return false;
        }

        // look for a non-whitespace character
        for (int i = 0, n = key.length(); i < n; i++) {
            if (key.charAt(i) != ' ') {
                return true;
            }
        }

        return false;
    }
Tests whether {@code key} is valid.

<p>Context keys and values may not be null or empty. A key/value will be
deemed empty if it's length is zero, or if it consists of only space
characters.</p>

<p>An exception is thrown when an invalid key is added to a {@link ContextSet}.</p>

@param key the key to test
@return true if valid, false otherwise.
@since 5.1
api/src/main/java/net/luckperms/api/context/Context.java