One map access could be avoided by just doing the `get()` and checking the result for null.