Fix potential crash when CFStringGetCStringPtr returns NULL.