Fix crash trying to format nil as string.

Reported by CWz.