protect against NPE in toString method