Getting specific property from node_load
Something like that should actually work.

The only issue might be that you are looking for the string '127' but want the integer 127, so remove the '. But I'm not 100% sure right now how PHP handles that.

Also note that you can use isset() instead of array_key_exists() here, so just 

if (isset($this_node-&gt;taxonomy[137])) {
}


should work too. The difference between isset and array_key_exists() is that isset() returns FALSE if they key exists but the value of it is NULL, while array_key_exists() returns TRUE in that case.