It will prevent crashing when the key is undefined and return a default value.
I have this issue when using react native getting data from API. Sometimes, data does not have that key and sometimes, it has but it is null. This should be able to fix my problem hopefully.