Widget: Avoid adding extra spaces to the result of this._classes(...)

This is a PR on top of a PR (#1369).
I was actually hoping we might discuss this. I had exactly that simple check there at first, but then I thought to myself: do we want to be lax about checking the type here, so as to avoid ending up with "ns-structure-class [object Object]" or whatever, or things like "ns-structure-class true".

I mean, these are option values, so the come straight from the developer at worst (if the instance is created with options), or from the framework developer at best. Either way, we may want to consider them "outside, untrusted" or whatever.

Nevertheless, if we consider the simple check you mention to be sufficient, I'm certainly happy to update the PR.