Try catch for get value for input field.