Object field passes if statement without data object created

I have a question about the Object field.

I was under the assumption that if an Object field has no data object created in the panel, then the below “if statement” would fail. Is that correct? In my case it passes and prints “PASS”.

<?php if ($catalogue = $page->catalogue()->toObject()): ?>
  
  PASS   
  <a href="<?= $file->url() ?>">Download Catalogue</a>
       
<?php endif ?>
catalogue:
  type: object
  fields:
    pdf:
      type: files
      max: 1

Thank you!

Yes, if you don’t want to print that, you need to check if the field is not empty before converting.