More robust syntax that prevents KeyErrors