Get the flashbag content then see if it's empty or not:
{% set contactActionNoticeError = app.session.flashbag.get("contactActionNoticeError") %}
{% if (contactActionNoticeError is not empty) %}
bla1
{% else %}
bla2
{% endif %}
You can still display the errors (code taken from the documentation):
{% for flashMessage in contactActionNoticeError %}
<div>
{{ flashMessage }}
</div>
{% endfor %}