Avoid writing course grades when null