catch KeyError rather than ValueError