Fixed onClick conflicting with attr wrapped.

Prevented string manipulation when attrValue == undefined.