string: check parameters before dereferencing.