Merge "Fix two potential NPEs in DeviceInfo"