if a valid avd-id is passed in (say "10"), !isNaN(avdid) will evaluate to true and the entire conditional will evaluate to true, meaning avdid of 10 will be reset to 0