Rewrite array_ndims to fix List(Null) handling
#8320
Merged
array_ndims to fix List(Null) handling
#8320