handle terms!=null but terms.size==0