Change a room assignment only if it is still current
Conditional update with map::find
Conditional map update
MutableMap.replace on the JVM
Conditional dictionary assignment
Map.updatedWith and Option