Handle custom attributes with empty values, fixes #270

Fixes Bug #270 

Also added a test that triggers the described error without that fix.
Do you mind moving this comparison up to the preceding else-if clause?

```javascript
else if (attrValue && options.customAttrCollapse && options.customAttrCollapse.test(attrName)) {
```