@staticmethod
def is_str_hexadecimal(s):
    """Check if a string is a hexadecimal byte string.

        For example, '909090' returns True.

        Note:
            By design, hexadecimal strings with a length of 1 will return
            False. isalnum() will check for operators like + and - that would
            normally successfully validate.
        """
    if s.isalnum():
        if len(s) % 2 == 0:
            try:
                return isinstance(int(s, 16), int)
            except ValueError:
                pass
    return False
