collection length check for collections