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

MapWrapper blindly calls .hashCode on keys that can very well be null.
Merge pull request #3704 from gourlaysama/wip/t8504

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