Fix for "Object object has no method 'hasOwnProperty' in
lib/helpers.js:41, likely cause value is null.