Modified contract for contains in order to guarantee compilation