Made TypeName.findOrCreate thread-safe