fix dict access guarding; return item