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

#6454