only set the missed output argument when it is not NULL