This seems to be the right way to get an element's value.