[SPARK-4676] [SQL] JavaSchemaRDD.schema may throw NullType MatchError if sql has null