Hi Surabhi Srivastava,
It seems like one of the variables that is coming from the object student is empty.
To avoid that we can do a if else condition, only adds the grade if the attribute is different that empty or ‘’.
However I believe is better to have the marks in another entity.
Would we like to have more marks associated to student during the time?
Please let me know if it helps