Correct array check in URI validation