prefer block.nil? over block_given?