the 'in' operator accesses the keys of a dict. So this is safe code