I want to check if my array is empty or null, and on base of which I want to create a condition for example.
if(array == EMPTY){ //do something }
You can also do this kind of test using if (nrow>0). If your data object is not formally an array, it may work better.