Phtoshop Rasterize PDF and EPS detection

I have an application script that copies 8 files to a folder and then appends different file extensions. Then I have Photoshop repeat through the list until it is able to open one of the files.

All of this is happening without any open dialogs displaying, which is great.

The problem is, I do not want Photoshop to rasterize a PDF or EPS. Is there any scripting way to keep the dialogs to never show, yet still detect if the file will need to be rasterized by Photoshop? Keep in mind that not all EPS or PDF files need to be rasterized by Photoshop prior to opening.

Thanks in advance, I realize this isn’t a common script question.