Replace return value of type() with named values