cope with zero-terminated/zero-length strings
make the RIFX cast ID hack work