valid_entities function

Filter entities to include only valid biomedical terms