If you want to pattern match an empty map, you can use the guard when map_size(a_map) == 0.
when map_size(a_map) == 0