Always treat null/empty/missing required values as first-class cases: validate early, and either stop with a clear “HALT-and-ask” (for inputs needed to proceed) or conditionally render safe output (to avoid blank placeholders).
How to apply:
Example (combining both patterns):
# Input validation (graceful halt)
if spec_file is empty OR NOT file_exists(spec_file):
HALT("Provide spec_file path before proceeding")
# Conditional rendering (safe null handling)
if status_file_found == true AND status_update_success == true:
render("Status Updated + Next Steps using next_workflow/next_agent")
else:
render("Status not updated; Next Steps: not specified")