Remove nul pointer test in methods of string class.