Replace `None` with `''` and you can remove the if statement in line 99.