Hello @Daya Sandhu , Thanks for the question.
You have a condition check on the type of attachment so whenever there is no attachment, it is still tryin to check the type as per your design. Instead you put a check on the "Has Attachment" property . Something similar to :
This works fine for me.
If this helps, please "Accept the answer" and "Up-vote" so that it helps others in the community.