How to validate if node is ubercart product?
I think the most solid way to test would be to check that the node's type is one that the uc_product module considers to be a product node type. You can do that by using the uc_product_types() function:

$node_types = array_keys(uc_product_types());
if (in_array($node-&gt;type, $node_types)) {
  // The node is a product
}