Cast edit handler type names to str before passing into type()

On python 2, these need to be bytestrings and on python 3 they need to be unicode. So casting to str is a good fit.