Using a safer boolean conditional in URL prefix checker