Added more assertions for string helper.