[WidgetService] Unify way of checking watchId in webapi plugins.