def _files_from_kwargs(**kwargs):
    """Grabs the contract and config file from the kwargs

    Returns None if neither exist.
    """

    files = {}

    if 'contract' in kwargs and kwargs['contract'] != None:
        files['contract'] = kwargs['contract']
    if 'config_file' in kwargs and kwargs['config_file'] != None:
        files['config_file'] = kwargs['config_file']

    if len(files.keys()) > 0:
        return files

    return None