I think there is the issue with the quotations around the NA resulting in is.na to not pick up those elements:
is.na(c(NA, "NA"))
#[1] TRUE FALSE
After doing the fix, it may have lost the quotes and evaluate them correctly.
If you are wondering what is R programming, then do check out the blog that will help you in clearing all your doubts.