trim whitespace from type names

When splitting the type names list, trim leading and trailing whitespace
from the type name before returning it. This fixes spaces appearing in
the test name due to extra whitespace in the types argument list.