cppcheck: Possible inefficient checking for emptiness

Change-Id: I2b353435b29046b05acbb1193fda168309e01f4b