Bug fix: Prevent crash if an input element doesn't have a type attribute.