Merge "Add null check in background thread" into main