Properly evaluate empty map updates and patterns

Code like `[camembert]#{}` and `#{} = 1` didn't check that the argument is indeed a map.