BHV-1187: Guard against null and undefined values.

Enyo-DCO-1.1-Signed-off-by: Aaron Tam <aaron.tam@lge.com>
Merge pull request #1188 from enyojs/fix-BHV-1187-aarontam

BHV-1187: Guard against null and undefined values.