This can be moved outside and above the containing `if` for a bit simpler logic.