Check if Assets Field Contains File of Type
See kind in the docs: https://craftcms.com/docs/templating/assetfilemodel

I haven't tried it but I suspect it's something like this:

{% set file = assetsField.first %}
{% if file.kind == 'image' %}
  // blah blah
{% endif %}


There's also extension but kind is probably better here.