Protect string extension method against concurrency