This should probably throw an error before hitting the error with if_else().
library(fcds)
library(dplyr, warn.conflicts = FALSE)
tibble(age_group = NA) %>% separate_age_groups()
#> Error: Problem with `mutate()` input `age_max`.
#> x `false` must be a double vector, not a logical vector.
#> ℹ Input `age_max` is `if_else(is.na(age_max) & !is.na(age_min), Inf, age_max)`.
Created on 2020-07-31 by the reprex package (v0.3.0)