Fixes bug with dynamic query builder where relation.id=_null would return empty resultset