- if (!this || !m_characters)
- return Identifier(globalData, static_cast<const char*>(0));
+ if (!this || m_string.isNull())
+ return Identifier();
+
+ if (m_string.isEmpty())
+ return Identifier(Identifier::EmptyIdentifier);
+
+ if (m_string.is8Bit())
+ return Identifier(vm, m_string.characters8(), m_string.length());