NPE protection
Since StringBuffer is now returned, tests must now call toString() method