Removing useless double test on data.size()