'Checks for empty metadata values, Returns True if non-optional metadata is missing
Specifying a list of \'check\' values will only check those names provided; when used, optionality is ignored
Specifying a list of \'skip\' items will return True even when a named metadata value is missing'

def missing_meta(self, dataset, check=[], skip=[]):

    if check:
        to_check = ((to_check, dataset.metadata.get(to_check)) for to_check in check)
    else:
        to_check = dataset.metadata.items()
    for (key, value) in to_check:
        if ((key in skip) or ((not check) and dataset.metadata.spec[key].get('optional'))):
            continue
        if (not value):
            return True
    return False
