WW-4436 Fixes NPE and uses String.valueOf() instead of .toString()