def check_existence(item, field_name, subfield):
    """
    Check that item has particular field_name and subfield
    :param item: item to check
    :param field_name: main field_name
    :param subfield: subfield of field_name
    :return: return value of this field if it exists and None otherwise
    """
    try:
        if subfield == 'text':
            return item['characteristics'][field_name][0]['text']
        elif subfield == 'unit':
            return item['characteristics'][field_name][0]['unit']
        elif subfield == 'ontologyTerms':
            return item['characteristics'][field_name][0]['ontologyTerms'][0]
    except KeyError:
        return None