Add a method to check if input is number or not