Determining the attribute type from Akeneo attribute value from payload dynamically is not a reliable way as values may be present or absent in payload based on data in Akeneo or its family attributes association in Akeneo.
Better you create a configuration in Magento for attribute mapping between Magento and Akeneo. This would be one time config. And update it as and when there is new attribute introduced is Akeneo.
Then update your logic using that mapping + available attributes in payload and create/update product in Magento accordingly dynamically.