"""Normalize user email for DB storage (blank → NULL avoids global unique collisions)."""
from typing import Optional


def normalize_user_email(email: Optional[str]) -> Optional[str]:
    if email is None:
        return None
    value = str(email).strip()
    return value if value else None
