Fixed onClick conflicting with wrapped attributes.

Prevented string manipulation when attrValue == undefined.