Before commiting the INSERT/UPDATE statement you need to check if the
Marks column has data or not.
Try something like-
IF(NOT EXISTS(SELECT Marks FROM YourTable WHERE Id=@Id AND Marks IS NOT NULL))
BEGIN
END
Hope, it helps :)
Please let me know if you need further help.