trimming only if lbl is string
and using $.trim instead of "".trim()