Wrap the before filter conditional in proc, cannot be bool