Specializing in niche practice areas is one of the routes small and midsize law firms in Northern Virginia have taken to stay viable and competitive, as more large law firms have set up offices in the region in recent years.