[SPARK] Tweak Map signature from Object to AnyRef

relates #251