Update query method gen based on Active Record query method

This way blank? and Numeric zero? are taken as special cases and
return false.