Distinct in one column where another column has same values
SELECT name, MIN(type) AS type 
FROM table_name 
GROUP BY name
HAVING COUNT(DISTINCT type) = 1 ;


or the same with: 

HAVING MIN(type) = MAX(type)


I assume that type is not nullable.

If you want only those that have type = 'a', use:

HAVING MIN(type) = 'a'
   AND MAX(type) = 'a' ;