Simpler way to validate URI