If the replace function returns null, default to leaving the original match