Fix for different element types

Lets just check for any input element.

The previous method did not work on [html5 input types](http://www.w3schools.com/html/html5_form_input_types.asp).