Check if a node exist where field_a = Sessionvalue && field_b=arg1
If you want to get value from entity without loading the entity object. You can use EntityFieldQuery

Example:

$query = new EntityFieldQuery();

$query-&gt;entityCondition('entity_id', 1)  
      -&gt;fieldCondition('field_custom_field', 'value', '', '!=')
      -&gt;addMetaData('account', user_load(1)); // Run the query as user 1.

$result = $query-&gt;execute();

if (!empty($result['node'])) {
  // field value exists!.
}