Changing dict key access method for safety