SI-8504 fix NPE in the Java wrapper for a Scala Map.

MapWrapper blindly calls .hashCode on keys that can very well be null.