I'm not a big fan of this `if`, but I cannot come up with something better.