BHV-16293: Added a check to verify there is content in a control before assuming its directionality.

+ Misc whitespace cleanup.

Enyo-DCO-1.1-Signed-off-by: Blake Stephens <blake.stephens@lge.com>