I got momentarily confused. I thought that `val` came from a JSON blob, but it doesn't. It comes from an HTTP POST. Let's remove the special checks for `None` and `0` and leave it as `and not val`.