037c2881d8
Fixes remaining NOT NULL constraint failures after PR #312. Problem: - Even with COALESCE in SQL, some sessions still fail with NOT NULL error - Hermes may return undefined/null/NaN values that pass through COALESCE Solution: - Add explicit type guard: `typeof value === 'number'` - Only use the value if it's a valid number, otherwise default to 0 - This ensures we never pass undefined/null/NaN to the database Related to issue #308