Added check for arrays of arrays and empty complex types.