Try not to execute nil blocks. (Issue #1211).