Do not try to call decode() on a text string

This fixes a call to 'isinstance' that only worked on Python2.

Closes-Bug: #1265879
Change-Id: I886da95f1ad2a8314de92be8aecb354ee3124e6d
Merge "Do not try to call decode() on a text string"