Check If Element Exists In Map Python