Fix for issue #48; only get value from val() if element is an input.