@pwendell 

I think it should be Option

if sparkHome is null

scala> val a = Some(null)
a: Some[Null] = Some(null)

scala> a.isDefined
res11: Boolean = true

scala> a.getOrElse("abc")
res12: String = null

in worker it will still pass a null to the executor