BHV-1187: Guard against null and undefined values.

Enyo-DCO-1.1-Signed-off-by: Aaron Tam <aaron.tam@lge.com>