Fix null check

`Selenium::WebDriver::Error::JavascriptError: 'null' is not an object (evaluating 'el[key]().indexOf')`

This happens when an element exists that doesn't have the proper value.

> execute_script "[$('text')[0].name()]"
=> [nil]