def is_hex(s: str) -> bool:
    """A method that checks if a given string is hex encoded.
    :param s:    The string in question.
    :returns true if s is hex encoded, false otherwise."""
    try:
        int(s, 16)
        return True
    except ValueError:
        return False