Muhtaram Rafi Bhai,
You are a blessing to us.
You are right, and I consider Ibn Khaldun, [Abu Zayd Abdur-Raḥman bin Muḥammad bin Khaldun Al-Hadhrami, 1332 CE/732 AH – 1406 CE/808 AH, of Tunisia] a genius.
Especially the Muqaddama (Initiation) of his History is La-Jawaab (matchless). He was one of the few Muslim scholars who would use their intellect without getting carried away by blind following.