I think the only problem with this is that you're silently skipping certain things. It would be nice to know what those things are, but my guess is that you could get away with setting it to `None` (more semantically correct) or an empty string (more likely not to throw JS errors down the line).