If there's one image in your document which you know is bitmap, you can
store that in a string:
is_bitmap_string = bitmap_image.space
and use that to compare.
If not, you could consider getting the script to embed a bitmap image
into the document and then doing that.
There is probably a way of embedding a tiny (1 bit?) bitmap image into
the script itself, so you wouldn't necessarily need two files -- or
maybe create a temporary tiny bitmap, store it somewhere, embed it, get
the string, delete it...
Just some ideas...
Maybe there's a more straightforward way...
Ariel