Is there a way to see if a sprite is sliced in code?

I have Sprite objects that can be assigned to Image.sprite, I want to set Image.type to Sliced automatically if the sprite is sliced. Is there a way to check if a sprite object is sliced in code?

Use Border. If it’s (0,0,0,0) then it has no borders so it’s not sliced.