Legal approaches to operationalize nationality and ethnicity