Check string length before stripping namespaces.