How do you use 'if' to stop an empty Matrix block from displaying?
If a Matrix field / block is empty it won't output at all but you can try checking the length in an if statement like:

{% if entry.modelDataType1 | length %}
    // matrix content here
{% endif %}