Where search for 0 produces IS NULL query

I had a table set up like this.

```javascript
{
    path: String,
    minor: Number,
    major: Number
}
```

I noticed when one of the values was set to zero and I would do searches results would return empty. My pull request includes the fix + tests.