Grouped conditions on inputs in a single tag name check in setValue

As a side effect, the ``type`` attribute is now retrieved only when the element is actually an input.