Thanks to visit codestin.com Credit goes to archman.dev
Handle object type variations through polymorphic types rather than conditional logic