Yes, there is! Purchase the Istanbul Museum Pass. You can purchase it online or at any of the museums covered by the pass. The pass covers Hagia Sofia, Topkapi Palace, Chora Museum, the Archeological Museum, etc. Go to the official website for into: muze.gov.tr. Go to the top right corner and switch to English. I copied and pasted from that website:
“With Museum Pass İstanbul, you can visit more than three hundred museums and archaeological sites that belong to Republic of Turkey Ministry of Culture and Tourism for 5 days and enjoy your trip through time. The price of Museum Pass İstanbul which is valid for five days starting from your first museum and archaeological site entrance is 220 TL.”
At Hagia Sofia, I highly suggest hiring a tour guide. The official price in March 2019 was 200 TL for taking you through and explaining everything. I think it is very informative to have a guide. There are guides at the entrance, but not all speak English very well. I strongly recommend hiring the guide we used: his name is Metin. His cell number is +90 (533) 322 00 85 If you have WhatsApp, you can message him for free using WhatsApp. Metin speaks English perfectly, he really knows history, and he is funny. You should consider hiring Metin to take you to other attractions in Istanbul.