check if name is duplicate