dictionaries provide a "default" argument

r.get("direction", "")