[SPARK-2295] [SQL] Make JavaBeans nullability stricter.