# No error
input = "male"
arg_match0_allow_na(input, values = c("female","male"))
# Allow NA
input = NA
arg_match0_allow_na(input, values = c("female","male"))
# Error as M is not female or male
input = "emale"
try(arg_match0_allow_na(input, values = c("female","male")))
Run the code above in your browser using DataLab