fix null bugs in CStringUtils.indexof