title: Issue while parsing mongo collection which has few schemas in spark
body: <p>I'm moving data from one collection to another in other cluster using Spark. the data's schema is not consistent(I mean that has few schema's in a single collection with different data types with little variations). When I try to read data from spark, the sampling is unable to get all the schema's of the data and throwing the below error.(I have a complex schema which I can't explicitly mention instead of spark gets by sampling.)</p>
  
  <p><code>com.mongodb.spark.exceptions.MongoTypeConversionException: Cannot cast ARRAY into a NullType (value: BsonArray{values=[{ "type" : "GUEST_FEE", "appliesPer" : "GUEST_PER_NIGHT", "description" : null, "minAmount" : 33, "maxAmount" : 33 }]})</code></p>
  
  <p>I tried reading the collection as an RDD and write as an RDD still the issue persists.   </p>
  
  <p>Any help on this.!</p>
  
  <p>Thanks.</p>