i realize you didn't touch this code, but good as a  rule of thumb to use `===` in javascript - especially when comparing something to `null`. 

```javascript

'' == '0'          // false
0 == ''            // true
0 == '0'           // true

false == 'false'   // false
false == '0'       // true

false == undefined // false
false == null      // false
null == undefined  // true

' \t\r\n ' == 0    // true

```