Fix lookup of a device by hardware model if input is not a lowercase string