Check both attr("value") and element.text() in optionToData 

fixes #992 without using prop