Added KeyError check
Changed double to single quotes