Added assertion where cd id does not exist
Changed dictionary return style to return None if key does not exist