Added condition against nil from block.