error handling for missing dict