fix: crash caused by app.getLocaleCountryCode() (#32256)
fix: crash caused by app.getLocaleCountryCode() (#32256)

CFLocaleGetValue() returned null and crashed the process when
app.getLocaleCountryCode() was run on a CircleCI metal resource class
macOS instance with Xcode 12.5.1. This change fixes that logic and adds
further checks to make the code future-proof.

Here too people are complaining that the returned country code migth be
null: https://stackoverflow.com/questions/15202454/nslocalecountrycode-returns-nil

Signed-off-by: Darshan Sen <8c5228ad0bdbfc35dc2e1061ec0b3fe0a1c68109@postman.com>
electron/electron,gerhardberger/electron,electron/electron,electron/electron,electron/electron,electron/electron,gerhardberger/electron,gerhardberger/electron,electron/electron,gerhardberger/electron,gerhardberger/electron,electron/electron,gerhardberger/electron,gerhardberger/electron