Avoid calling strtolower() unless necessary.