This will trample $params['value'] if it's 0, '', or FALSE. I think we only want to apply the default $params['value'] if it's strictly unset or if it's NULL, i.e.

if (CRM_Utils_Array::value('value', $params, NULL) === NULL)