Moved number validation check in each method into a common method