Handle empty dictionary checking in Dictionary.
Minimize exception declarations.