Multiple selection by mouse cursor

One more question, maybe you know is there any problems for for each loop when array is empty? I saw many people before for each loop checking if array is not empty, why ?