I have added
<p> <a href="#comment"><b>Questions and Comments</b></a> (<?php comments_number( 'Ask a question', 'one response', '% responses' ); ?>). </p>
to my pages under the titles to encourage people to comment. But on some pages I have comments switched off. Is there is simple code that I can wrap around that so it is only shown when comments are on?