try
// stuff with StrtoInt
// ...
except
// it is not an int, so do other stuff
end;
StrtoInt will throw an exception if it's input can not be turned into an int. In case you don't know what an exception is: uhm.. well.... if something throws an exception, it kind of like skips code until it finds itself in a 'try catch' statement (usually called 'try catch' since the keyword to catch an exception is usually 'catch', not 'except' like in pascal) and gos into the stuff after the except. If you already knew what an exception was, then ignore that.
There are a few functions that can help you do exception stuff urself, ask if u want em, im lazy right now kuz not even sure if u wanted any of that info ^^