TempVar := @DbLookup(); @If(@IsError(TempVar); 'perform desired error response'; 'perform desired action on TempVar')
TempVar is used to hold the results and will also hold the special "error" value for comparison.