CASE: how to check if a document has been added

If you have following code to make it possible to add an attachment :


{% input custom.director.pay_check as:file %} 

then you can check whether or not a document has been added, by adding .document to the object with an if-statement, like this :


{% if custom.director.pay_check.document %}
There's a file added
{% endif %}