Shouldn't that realistically be just

`if (value && DOMProperty.hasBooleanValue[name]) {`

If it's a boolean, then it's a boolean.