More pythonic has_hex