Tightening up list.ofValues to allow strings and objects