Added a helper function to check valid number input