Here’s a very specific thought: as those are IDs, and not actually numbers (you’re never going to perform a calculation on them), it actually makes a bit more sense to treat them as strings at every point past the database.

If you’re going to insert it back into a database, you’re going to do conversion as part of the sanitizing of the data, but otherwise they are IDs. I suppose if you’re doing comparison between two different retrieved sources (one that has typecast them to integers and one that didn’t), you might run into a problem, but only if you’re ===’ing them. Point is, many IDs look like numbers, but treating them as such can actually be misleading.

Incidentally, thanks for the heads up on the flag. I’ve had a complaint about that before with regard to kicking out an epoch, which somebody did want to perform calculations on. In most cases, a number should be a number.