Small refactor of getSymbol