Objective-C: How to check if the key and value data types are expected data types in a NSDictionary?

If your code base still uses Objective-C as of August 2019. You might want to check if your application or library crashes if you are inserting wrong data type in a NSDictionary because the Objective-C compiler does not complain if the key and value data types are not the same as the expected data type in a NSDictionary during compile time. The crash will only occur during run time. The following are the run time scenarios for the crash occurence,

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store