When fields or parameters are optional (may be missing, null, or empty-string), code must be defensive so queries/playbooks/parsers don’t fail and so “unknown” stays unknown.
Do this:
isempty() / isnotempty() instead of isnull() when source can be "" (empty string) as well as null.
TimeGenerated=iff(isempty(EventDate), now(), todatetime(EventDate))isnotempty so empty-string doesn’t coerce to a valid value (e.g., 0).
SourcePort = iff(isnotempty(SourcePort), toint(SourcePort), int(null))coalesce (and a safe empty value).
labelsSafe = coalesce(Indicator.labels, createArray())column_ifexists(<col>, <default>) (or ensure the parser guarantees the schema used by the workbook).functionParameters values unless the query logic can handle parameters being unspecified.If you apply these patterns consistently, you prevent runtime failures from missing fields/columns and avoid silent data-quality issues caused by incorrect null/empty handling.