Index Outside Bounds of the Array

I am getting the error index is outside the bounds of the array which I understand why the error is there - the variable is empty however I need this to work when the variable is empty - any ways around this?


First check if the array of is wmoty and then if not empty proceed further

IsNothing(arrVariable) OrElse arrVariable.Count=0