Check if two object values both implements the `java.util.Map` interfaces.

Actual instance types can be different (for example `HashMap` and `PersistentArrayMap`, but they only have to share the same `java.util.Map` interface the same way that arrays do.