Make sure escaped entities are always strings