Fixed empty() on function call