empty() should be passed variables for PHP 5.4 or below

Signed-off-by: Chirayu Chiripal <chirayu.chiripal@gmail.com>