update haveOnly to work for Arrays and Objects