An anthropologist told me they national identity did not exist before the modern age, but I did read in some articles that many historians do not think that this is true.
So I wanted to know what is your take on this.
It really depends on what you mean by national identity. National identity definitely did exist to a degree but was not expressed in exactly the same ways as we do in the modern era. Pre modern national identity is not the same as modern nationalism and the reason why this is the case but I recommend the 'Invention of Tradition' edited by Hobsbawm and Ranger for a good series of discussions on this (especially the final chapter by Hobsbawm). Anyway I can give you an overview of some pre modern examples of what might be described as national identity.
Firstly the term nation comes from the Latin 'natio' which, unsurprisingly, is not a modern invention but goes back to ancient Rome - so the term is pre-modern. From the Roman period and through the Middle Ages nation was only one word used to describe a group of people along with others such as gens (people although translated as race in a lot of earlier published texts) or lingua (tongue, language or people) and all of these mean more or less specific things depending on context. Nevertheless the idea that you can identify and demarcate discrete groups, including your own, goes back a long way. Herodotus in his histories gives an account of different cultural groups who are defined by their customs, political organisation and language and he even provides many of them, like the Scythians, with a mythical ancestral origin - so shared customs and origin of peoples this is very much like a picture of a nation. Various Greek thinkers also offered theories as to why different cultures existed including the idea that climate or location affected the temperament of peoples (which was advanced by Hippocrates but significantly developed by Galen) or notoriously Aristotle's assertion that some people are natural slaves. As might be expected this differentiation of other cultures or peoples solidified Greek self identification - they were in the temperate zone, they were not natural slaves. Likewise in Rome you can see a form of national mythmaking in the Aeneid and Tacitus' Germania is a very developed ethnography of different German tribes. Moreover Romans stressed a form of cultural self identity of 'Romanitas' (Romanness) which differentiated Romans from barbarians. This belief in Roman cultural superiority persisted even as the barbarians were at the gates - one letter writer Sidonius Apollinaris writes mockingly in private about how slurred and bad a Germanic king's Latin is all while writing Roman panegyrics for him (in an irony of history the Loeb edition of Sidonius' writing has an introduction from the translator moaning about how bad Sidonius is at Latin).
Anyway so now Rome has fallen but in the middle ages we have a lot of evidence for national identities of one sort or another. Early Anglo-Saxon lawcodes have differences in wergild based on rank which seems to include a reduced amount for a free non Saxon. The Exeter Book riddles includes disparaging comments on the Welsh including differentiating them as physically distinct ("dark Welshmen"). Bede in his Ecclesiastical History of the English people makes sure to show the differences between nations and makes sure to stress the unity of the English in spite of political division. Nationality was, therefore, noted in the early middle ages even if there was not really a notion that the nation had to have a political entity to represent it - in fact for a king to have the allegiance of many peoples is prestigious (Asser proudly talks about how Alfred the Great had the allegiance of the different peoples of Britain). During the Viking age there are also explicit references to Englishmen and Danes in decrees - even when they are under the same ruler. The English and Danes also had recognised differences in grooming habits - as can be seen when an Anglo-Saxon monk (Alcuin) writes a letter saying that the English were basically asking to be invaded by Vikings as they had started trimming their beards like them! All throughout this period different peoples associate themselves genealogically as a group and trace descent - the Trojans are especially popular for this.
Later on we see even more evidence of nations being identified with. After the Norman conquest Englishmen sometimes kept their beards as a sign of defiance. Histories of nations appear in which nations have a set character and sins (such as Geoffrey of Monmouth's History of the Kings of Britain). Ethnographies start to be written again by writers such as Gerald of Wales (who argues that different nations inherited traits from the climates of their ancestral lands). The importance of nation can also be inferred from the fact that having no nation is not viewed positively - one particularly furious pilgrim to Spain says that the Navarese were no true people (ne veres) and could not trace their ancestry back to a single nation and that this explained their nefarious behaviour (such as poisoning his horse). All of this, however, occurs in a context where a single all encompassing nation (to the exclusion of all others) is hard to find - Lowlanders and Highlanders in Scotland, for example, are sometimes presented as different peoples (gens) but other times as members of the Scottish people - by the same author! The easiest place to find strict national character defined, moreover, is where it is falling apart such as in the Statutes of Kilkenny in the 14^th century. These identify Irish characteristics and forbids English colonists to engage in Irish practises for fear of being tainted by Irishness - this was evidently not working. Nevertheless notions of national identity do exist in Pre-Modern Europe and they could include many ideas we see today - shared genealogy, language, culture, dress, methods of fighting etc. - and existed alongside other forms of identity such as religious.
If you want to read more I recommend you read the article by Robert Bartlett 'Medieval and Modern Concepts of Race and Ethnicity' as it especially gets into the problems of language when addressing nation/ethnicity/race in the pre modern period.