Add changes for new search for blocks

you may write `if (!_.isObject(model) || !_.isFunction(criteria)) return [];` here instead of lines 83-89