Added try,except block to convert num_line to float or int