Avoiding notices for trusting  vars to be defined/isset
Empty search on replace returns new identical string. Replace in empty string now returns empty string instead of raising error.