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.
Merge pull request #2207 from fishcakez/dialyzer_abstract

Fix remote calls to work with dialyzer in 17.0