if weight textfield's text isn't a vlaid integer, asking for its value will now correctly return the last valid value