Test this by using the "falsy" properties of JavaScript. Both `null` and the empty string are falsy.

http://www.sitepoint.com/javascript-truthy-falsy/