do not access term as an array when it is an object
Merge pull request #6455 from openscholar/6454

do not access term as an array when it is an object