Merge "Add null bg check to switch"