exception safe list/tuple replacing for non-str values