Accessing values of unknown field types when using entity_metadata_wrapper
Here are a few suggestions to make this process a little easier.

$wrapper-&gt;field_something-&gt;type();


will return the type of the field, ie node, taxonomy_term, integer, text etc. You could then handle the value returned from $wrapper-&gt;field_something-&gt;value() correctly. 

Also 

$wrapper-&gt;field_something-&gt;raw()


will return the raw value of the field. Which will either be an array in the case of multi valued fields of just the value. For instance an entity_reference will be the nid (or entity id) of the referenced entity, or an array of referenced entity id's.