Merge "Add a null check in case device disappears." into pi-dev
am: 3c6f5390a2

Change-Id: Ia730890f89d07025340c03211e829996ab20c2e8