When X posts return engagement: null, dict.get("engagement", {}) returns None (key exists with null value), causing AttributeError. Use `or {}` idiom to coalesce None to empty dict. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>