checked for invalid input in roman_to_integer