Reliability fix: Check whether a dictionary contains a given key before requesting it