Modifying device to account for API not existing on older versions of the OS
and for errors with missing properties.