Quick solution for wrapping in div

Not really tested (sorry). Some dry coding. But you see what I mean. Hope you find it useful.
`if (wrapper && wrapperClass) {` should be good enough to check (the wrapperClass shouldn´t be null at all because it is set to '').
And please wrap it in brackets!