EPDM GetObject: How do I get a IEdmObject5 object without Specific Type

I have a Before Checkin Event in my Addin.  As I cycle through the ppoData, I need to get the fileobject like this

 

ThisFile = poCmd.mpoVault.GetObject(EdmObjectType.EdmObject_File, FileUID)

Which is all good and well if I know that it is a FILE (EdmObjectType.EdmObject_File)

What if the item turns out to be a BOM?  I will get an error.

I need to get the iEdmObject5 generic object, get it's type and then decide whether to ignore it or not.

Bottom Line:  I have an ID.  How do I get the object type?

Any ideas. 

(I could use a series of try catch blocks, but I hate that approach)

SolidworksApi macros