Handle zero-length string in constructor