Can you check block_given? (or rather, just take the block argument and check that).