But you might as well not check for this at all and just use skipmissing(data). That will work for both your scenarios.
skipmissing(data)