jQuery( document ).ready( function( )
{
  $('#title_dummy').hide( );

  var title_d = $('#title_dummy').text( );

  if ( !isBlank( title_d ) )
  {
    //do something
	  $('#main_title').text( title_d );
  }
});

function isBlank( pString )
{
    if ( !pString || pString.length == 0 )
    {
        return true;
    }
    // checks for a non-white space character
    // which I think [citation needed] is faster
    // than removing all the whitespace and checking
    // against an empty string
    return !/[^\s]+/.test( pString );
}