Merge "Replace possibly-expensive size() == 0 with isEmpty()"