add if to check for naked where clause to set scope

* fix for #2228
* previously would not scope anything when using documented form

    { where: { someAttr: ‘value’ } }
Merge pull request #2286 from craigbeck/fix/scopes-are-broken-2228

add if to check for naked where clause to set scope