Cast numbers and booleans from the cookie into their JS types