Python Array Check If Key Exists In Object Oriented