[maya][python] detect if imported OBJ has no UVs?

My batch exporter is close to functional, but when it encounters an imported OBJ without UVs , Maya crashes completely (thus halting the batch)

I’d like to just throw a default map on those, log it, and keep going.
But I can’t figure out how to test for the existence of UVs…

found a solution:

cmds.polyEvaluate(uvcoord=True)

returns the number of UV coordinates for a selected polyMesh