[SPARK-2210] boolean cast on boolean value should be removed.