Check for Object in Stacktrace

Stacktrace is only checking for an array, not objects. It will still try to substr objects.