Instead of doing the check during every request, just make sure the block is always setup. Something along:

```ruby
def initialize(...)
  @block = block || ->(env) { ... }
end
```