Properly handle bytes type