Add null checks in Quiz constructor