Using containsKey and then get, causes two lookups.  Instead, simply call get and then check for null.