diff: handle NULs in get_string_hash()