Added checks on the setters for DeviceId and DeviceName to throw exceptions if null or empty.