'Checks if build is valid on Koji
:param pkg: a Pkg instance'

def is_pkg_spec_build_valid(self, pkg):

    if (pkg.build is not None):
        info = self.session.getBuild(int(pkg.build))
        if info:
            return True
    return False
