Merge "[Settings] Add NPE protection" into main