[SPARK] Fix NPE for ExternalAppendOnlyMap

It did not handle null keys very gracefully before.