Simplify checking for UTF8 hash keys