Helper function to safely access a property from an object that might not have TypeScript definitions
The object to access
The property key
Default value if property doesn't exist
The property value or default value
Helper function to safely access a property from an object that might not have TypeScript definitions