[SPARK-4250] [SQL] Fix bug of constant null value mapping to ConstantObjectInspector

Why the cast here?  This destroys null values:

```scala
scala> null.asInstanceOf[Short]
res0: Short = 0
```