Do not rely on regexes to cast strings