Fix remote calls to work with dialyzer in 17.0

In 17.0 dialyzer will crash on an empty map case pattern when its is
known that pattern will not match. The is_map guard is used instead of
the empty map pattern.