Fix issue of queries around nullable values.

close #12