updating duplicate5

adding if statement to check if for integer value.