Hi,
My $0.02 to the explanation given by shankar_r:
-- When searching by XPath, TestComplete tries to match the found native DOM element(s) to the objects from its (TestComplete's) objects tree;
-- If the match succeeds, TestComplete's object is returned. Native DOM element is returned otherwise;
-- If XPath found nothing then null is returned (see TestComplete's documentation for more details).
So, if TestComplete was able to match the found DOM element to its objects tree, you will be able to call .Click() method because this is a method that TestComplete adds to all UI objects from its object tree.
If TestComplete failed to match the found DOM element to its objects tree and the native DOM element was returned, you will be able to call .Click() method only if it is supported by this given DOM element. And the chances are high that the call will fail because of case-sensitivity: .click(), but not .Click() is usually supported by DOM elements.
If XPath found nothing, it is obvious that the call to null.Click() will fail as well.
P.S. The above is one of the reasons why XPath search is highly not recommended for TestComplete.
P.P.S.
var pageObject = page.FindChildByXpath("<your xpath>");
if(pageObject.Exists
...
Note, that the above verification will work as expected only if TestComplete can match the found DOM element to its object. If not, then you will get an error that .Exists property does not exist (which is correct, because native DOM element does not contain .Exists property).
So, if you really need to search by XPath, you must check for null first to ensure that something was found, then check if .Exists property is supported. If it is, then you may assume that TestComplete's wrapping object was returned and can use any method provided by TestComplete. Otherwise, you can use only native web methods provided by this given found DOM element.
(This is another reason why XPath is not recommended for TestComplete :) )