isinstance checks should be done against bytes/str, not against the bytes proxy