Check the type of universal id before getting its id. 

 Should resolve bug #2137