Small code improvement - foo !== undefined instead of typeof foo !== 'undefined'