So after also passing in the package.id, it would be: if (string.IsNullOrWhiteSpace(language) || !id.EndsWith("." + language)).