update conditionals to check against params to avoid false positve from empty data object