How do I get a string from the com port and check it?

There is another library that can do non-blocking-receiving of strings / characters.
And here is a link to a short tutorial that has an example-code