check exists, when where is func, query builder is passed to it