Optimize shuffle and fix comment

The check is to avoid repeated undefined value lookups when shuffling an array. When `index === rand` I know the value of `result[index]` is undefined so I avoid looking up the hole in the array.