[libvirt] [PATCH] Improve invalid argument checks for the public API