Fix crash with appendDataToBuffer appending a nil NSString
Merge pull request #370 from Zehhu/data_to_buffer_crash

Fix crash with appendDataToBuffer appending a nil NSString