Importing custom DB table entries as posts with Categories

Resolved: Just needed to add trim to the term names retrieved from the custom DB table!! D’oh!