fix for crashing bug

While using When with `then` or `fail` undefined it may call a block variable which will then cause a crash.

@joshdholtz