fix(misconf): guard nil Healthcheck when building Dockerfile from history (#10899)