Avoid typecasting unexpected strings to symbols to prevent DoS due to memory leak