Null check in toString