It is a good idea to make some validation, I will add a little bit logic to ensure the length of the version element is greater than 0.