simplify location validation