Added missing check for nil value sent to enumeration block.