only check isdefined with Arrays