Handle null provider response when falling back to looking up device by hostname

Provisioning when `provider` and `provider_id` are not set (and `list` therefore remains null) throws an exception. This minor null check restores the lookup by hostname functionality to working order.