Prefer TypeNames.forClass for input of potentially primitive or array types.

Closes #79.