Checking if term is not wp_error before adding to collection
Merge pull request #170 from VarunAgw/important

Make sure `term` is not an error before using.

See #169