from typing import Optional


def _element_add(x: Optional[float], y: Optional[float]):
    """Add dipole elements where a value may be None then None is returned"""
    return x + y if x is not None and y is not None else None