ensure `str` is string while `replace_str`. fix issues #61