The Location constructor should be responsible for checking validity not the caller. The XML modulestore is responsible for converting to the right repr and thus handling syntactic correctness.