How to check for null/empty in output file

I have following file, in some case

output "health_check_ids_app" {
  description = "Autogenerated health check ids."
  value = module.ilb_app[*].health_check_ids.healthcheck
  value =  try( module.ilb_app[*].health_check_ids.healthcheck)

In some case healthcheck is empty, so cannot assign directly , and neither it work with try block to check for empty before assging value. It throw below error

Error in the function call
│   on line 30, in output "health_check_ids_app":
│   30:   value       =  try( module.ilb_app[*].health_check_ids.healthcheck)
│     ├────────────────
│     │ while calling try(expressions...)
│     │ module.ilb_app is object with 10 attributes
│ Call to function "try" failed: no expression succeeded:
│ - Unsupported attribute (at,57-69)
│   This object does not have an attribute named "healthcheck".

How I can check for empty vlues of health_check_ids and healthcheck from module.ilb_app[*].health_check_ids.healthcheck