Sounds ok to me, however, In my experience, the application crashes when comparing with '', comparing with nil generates an error as you cannot compare a pointer with a string. But I could typecase of course. I'm confused because I'm using Lazarus for ages, and never have seen this happening.