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’ } }