Fixed issue #18: An error is returned if there is no option given with no value

The val method of `newHiddenInput` was being called before defining the object. This was an issue when your first option element specified a value or you set a `selected` attribute on one of your option elements. This fixes issue #18.