title: Checking if RoomDatabase is empty while using LiveData
body: <p>I am trying to use <code>RoomDatabase</code> in my Android App. And I am using <code>LiveData</code> to be able to refresh my changes automatically inside my fragment.</p>
  
  <p>The first time I am running my app I am getting the data from the API, creating my <code>RoomDatabase</code> and storing my data. </p>
  
  <p>The second time I run my app I want to check if my DataBase is not empty. But while using <code>LiveData</code>: the following code is returning null.</p>
  
  <pre><code>AppDatabase.getInstance(getContext()).getRecipeDao().getAllRecipes().getValue();
  </code></pre>
  
  <p>I have read that "if the response is an observable data type, such as Flowable or LiveData, Room watches all tables referenced in the query for invalidation".</p>
  
  <p>How to check if my RoomDatabase has data or is empty?</p>