def _check_val(val):
    """ Checks whether a minusconf value contains any NUL bytes. """
    try:
        if val.find('\x00') >= 0:
            raise ValueError(repr(val) + ' contains a NUL byte')
    except AttributeError:
        pass
