Fixed comments. Added null-check in fromUTF8().

I have also added null-check for fromUTF8(str), similar to 89343bb0c1ed7b16b1b1593691663ce68044d168.