[SPARK-2209][SQL] Cast shouldn't do null check twice.

Also took the chance to clean up cast a little bit. Too many arrows on each line before!

Can you file a jira ticket? I'm tempted to not fix that in this PR.