That probably does the wrong thing if the realm is missing, and still explodes on the empty string.