Added a method to output an optional block - i.e. a method that does not throw an exception if the block has not been defined.