fix empty() problem before for PHP < 5.5