Seems like this fallback will fail if an `<input>` has an empty value. It would probably be best to check the node type when polling begins, then cache it and use that to determine the polling behavior.