Data Type Validation In Spark