Fixes to the problem of NULL equality in the selector fields with date type

Still has problems with null values on date fields after https://github.com/seamusabshere/upsert/pull/26 closed.