Meta_query with or without value

check if the $GET[‘rating’] is set ( isset($_GET[‘rating’]) or has any value. ( !empty($_GET[‘rating’])

if not, build the query fecthing all post without ‘meta_query’

for example:

if ( (isset($_GET['rating']) && !empty($_GET['rating']) ) {
            // restrict
   $meta[] = array((
    'key' => 'rating',
    'value' => $_GET['rating'] );

} 
if ( (isset($_GET['tax']) && !empty($_GET['tax']) ) {
    $meta[] = array((
    'key' => 'tax',
    'value' => $_GET['tax'] );

}

$args = array(
         'post_type'=>array('listing','renting'),
         'posts_per_page'=> 6,
         'order' => 'DESC',
         'meta_query' => array( 'relation' => 'AND', $meta )

     );

warning: i didn’t tested the new code, so the the meta_query line might break the query if $meta is empty.