title: Convert Single<Boolean> to Boolean (Kotlin)
body: <p>I have a mutable live data which I use to adjust visibility(with binding adapter) in my layout. I use the boolean value of live data to achieve this with the code below. </p>
  
  <pre><code>@BindingAdapter("viewVisibility")
  fun setVisibility(view: View, visible: Boolean) {
      view.visibility = if (visible) View.VISIBLE else View.GONE
  }
  </code></pre>
  
  <p>To get this data I use the following method</p>
  
  <pre><code>   Flowable.just(
  Sdk().searchContact(CHATBOT_NAME)).map {!(it.isEmpty()) }
  </code></pre>
  
  <p>it.isEmpty() gives me a Flowable &lt; Single&lt; Boolean>> instead of Flowable and I want to convert this Single to a boolean(to give it as a parameter to my binding adapter) but I could not find a way to convert it. My temporary (probably bad) solution is below.</p>
  
  <pre><code>  it.blockingLast().isEmpty() // Blocking last gives me a list so I can get non-single boolean with isEmpty. Since I need one element from search contact method blocking last or first works same in this case.
  </code></pre>
  
  <p>Is this an acceptable solution? How can I convert Single to normal Boolean?</p>