Add null return protection

Calling toString on the arguments is causing null ref exceptions. The callers of this method appear to be prepared to handle nulls.