Safe isinstance for unloaded modules