title: How to get taxonomy term name from a queried object
body: <p>So I'm trying to achieve the following.</p>
  
  <p>My code so far..</p>
  
  <pre><code>add_filter('wpseo_title', 'vehicle_listing_title');
  function vehicle_listing_title( $title ) 
  {
    if ( get_post_type() == 'vehicles' )
    {
      $location = get_the_terms($post-&gt;ID, 'vehicle_location');
      $model = get_the_terms($post-&gt;ID, 'vehicle_model');
      $title = $model . 'used cars for sale in' . $location .'on'. get_bloginfo('name');
    }
    return $title;
  }
  </code></pre>
  
  <ol>
  <li><p>This code results in <code>$location</code> &amp; <code>$model</code> being an object containing the following <code>term_id =&gt;,name=&gt;,slug=&gt;,term_group=&gt;,etc</code> so I want to get the <code>name</code> part of it.<br>
  How do I do that?</p></li>
  <li><p>What do I have to add to the code to still return the modified <code>$title</code> even when there aren't any posts assigned to the queried taxonomies?</p></li>
  </ol>