if (@array2) { # array2 is not empty } else { # array2 is empty }