This should be
if (!empty($params)) {