Python Check If Index Exists In Dictionary