I have data in string as shown below

data1 data2
NA NA
NA NA
NA NA
NA 8415739
NA 10024002
N 12057882
N 10759322
N 11305650
N 10937087
N 11463371
N 11287917
N 12720750
N 14849447
N 15542380
N 17368642
N 20738561

I want to replace NA observation to missing(.)
I tried this command
replace data1=. if data1==NA stata return error "NA not found"

Can anybody help me on this please