This deserves a function. Also, would check only the first char be enough?