code: public function getTypeOfAttribute($value)
      {
          if (!isset(self::$attributeTypes[$value])) {
              $statement = $this
                  ->connection
                  ->createQueryBuilder()
                  ->select('type')
                  ->from('tl_metamodel_attribute')
                  ->where('id=:id')
                  ->setParameter('id', $value)
                  ->setMaxResults(1)
                  ->execute();
  
              self::$attributeTypes[$value] = $statement->fetch(\PDO::FETCH_COLUMN);
          }
  
          return self::$attributeTypes[$value];
      }
docs: Retrieve the type name from an attribute.
  
  @param int $value The id of an attribute.
  
  @return string