def get_motion_type(motion_detection_config):
    """Set default type if it is missing."""
    if not motion_detection_config.get("type"):
        motion_detection_config["type"] = "background_subtractor"
    return motion_detection_config