test for repace outside of list
add test for replacing missing obj
refactor tpye check