JSON generator: Don't segfault when passing null as String.

Closes #762