The previous implementation was causing keystone tests to fail, we need to correctly check what type of string is being served before attempting to encode it and service it to the mangler. Change-Id: I22e6ecbf07b41e486b0735dfea67ec14509b5a95