BHV-1187: Guard against null and undefined values.

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

BHV-1187: Guard against null and undefined values. - RC