Safe detect object and convert them to string