fixes #47: null check to prevent NPE
Merge branch 'bug/47-NPE-in-default-toString' into dev