dupstr() should cope with being passed NULL