Added method to safely parse an Integer to submit a valid information to the server.