title: return value only when it is available else wait for the value..... c#
body: <p>Return the value only when it is available. if I use a condition to check the null condition it is throwing a exception. "saying not all code paths return a value"</p>
  
  <pre><code> internal PinMessage()
          {
              obj.PinsAvailable.ObserveOn(SynchronizationContext.Current).Subscribe(HandlePinsAvailable);
          }
      private void HandlePinsAvailable(byte[] pinBytes)
      {
          pinmesssage = Encoding.ASCII.GetString(pinBytes);
      }
  
      internal string GetPinMessage(string AccoutNumber)
      {
          string pinstring = string.Empty;
          obj.SendPinRequest(AccoutNumber);
          pinstring = pinmesssage;
          return pinstring;
      }
  
      private string _pinMessage;
      public string pinmesssage
      {
          get//Not all Code paths return a value
          {
              if (_pinMessage != null)
              return _pinMessage;
          }
          set { _pinMessage = value; }
      }
  </code></pre>