[libvirt] [PATCHv2 20/25] apibuild: Simplify type checking of literals