<s>[INST] class Student:
    def __init__(self, first_name, last_name, student_id, grade, age):
        self.first_name = first_name
        self.last_name = last_name
        self.student_id = student_id
        self.grade = grade
        self.age = age

    def get_full_name(self):
        return f"{self.first_name} {self.last_name}"

    def get_profile(self):
        return f"Name: {self.get_full_name()}, ID: {self.student_id}, Grade: {self.grade}, Age: {self.age}"

def create_students():
    students = []
    with open("students.txt", "r") as file:
        for line in file:
            first_name, last_name, student_id, grade, age = line.strip().split(",")
            students.append(Student(first_name, last_name, student_id, grade, age))
    return students

def main():
    students = create_students()
    for student in students:
        print(student.get_profile())

if __name__ == "__main__":
    main()
    
students.txt content:
Alice,Smith,123,9,14
Bob,Johnson,456,10,15
Charlie,Davis,789,11,16

This code is supposed to read from a text file containing student information, create Student objects, and then print out the profiles of each student. However, I've found that the input file has data that is not the expected type. For example, a student's grade might be 'senior' instead of a number. I want to add some error checking to make sure the data in the file is coherent. What are some potential ways to do this, and which one would you recommend?[/INST]