Enable safestring for 4.02

this pattern could/should be made an auxiliary function to avoid duplicating the unsafe calls.