I agree with Sergey. In fact we have a function called IsArray that we use in our app:
function IsArray
lparameter ArrToChk
return TYPE( 'ALEN( ArrToChk )' ) = 'N'
While calling the function, pass the parameter by reference. So the call would be something like
if IsArray( @SomeVarName )
....
Juzar Malubhoy
Project Manager
Consindia Pvt Ltd.
Bombay, India.