Use dict:is_key/2 to test for the presence of a key.