Swift Check If String Is Empty Or Whitespace. Swift strings are represented by the String type. You might mean