Ah, brain poisoned by R's return() syntax; check if data is empty, then check data.colnames to make sure column names are passed in