title: on assignment of reactiveValues() empty dataframe created
body: <p>Reproducable example:</p>
  
  <p><strong>server.R</strong></p>
  
  <pre><code>library(shiny)
  
  shinyServer( function(input, output, session) {
  
      myDf &lt;- reactiveValues(myData = NULL)
  
      problematicDf &lt;- reactiveValues(test = NULL)
  
      observeEvent(input$myButton, {
              myDf$myData &lt;- df
      })
  
  
      observe({
              output$myTestUi &lt;- renderUI({
                      selectInput(inputId = 'mySelection', 
                                  label = 'Selection', 
                                  choices = levels(myDf$myData$z),
                                  multiple = T,
                                  selected = c(levels(myDf$myData$z)[1])
                      )
              })
      })
  
  
      observe({
              problematicDf$test &lt;- subset(myDf$myData, ((myDf$myData$z %in% input$mySelection)))
      })
  
  
      observe({
              str(problematicDf$test)
      })
  
      observe({
              as.matrix(x = problematicDf$test)
      })
  })
  </code></pre>
  
  <p><strong>ui.R</strong> </p>
  
  <pre><code>library(shiny)
  
  shinyUI( bootstrapPage( 
  
      h3("Push the button"),
      actionButton(inputId = "myButton",
                   label = "clickMe"),
  
      h4("Split Merkmal"),
      uiOutput("myTestUi")
  
  ))
  </code></pre>
  
  <p><strong>global.R</strong></p>
  
  <pre><code>df &lt;- data.frame(x = 1:10, y = 10:1, z = letters[1:10])
  df$z &lt;- as.factor(df$z)
  </code></pre>
  
  <p>This gives me:</p>
  
  <pre><code>NULL
  [1] "NULL"
  NULL
  Warning: Unhandled error in observer: 'data' must be of a vector type, was 'NULL'
  observe({
      as.matrix(x = problematicDf$test)
  })
  </code></pre>
  
  <p>Only looking at the output of </p>
  
  <pre><code>observe({
    str(problematicDf$test)
    print(class(problematicDf$test))
    print(problematicDf$test$z)
  })
  </code></pre>
  
  <p>after clicking on the <code>action Button</code>, without the <code>as.matrix</code>, I get:</p>
  
  <pre><code>NULL
  [1] "NULL"
  NULL
  'data.frame':   0 obs. of  3 variables:
   $ x: int 
   $ y: int 
   $ z: Factor w/ 10 levels "a","b","c","d",..: 
  [1] "data.frame"
  factor(0)
  Levels: a b c d e f g h i j
  'data.frame':   1 obs. of  3 variables:
   $ x: int 1
   $ y: int 10
   $ z: Factor w/ 10 levels "a","b","c","d",..: 1
  [1] "data.frame"
  [1] a
  Levels: a b c d e f g h i j
  </code></pre>
  
  <p>That is problematic. As you can see it creates first a <code>df</code> which is sort of empty, with placeholders, of <code>class = NULL</code>. And then, it fills this. However, it seems that other <code>reactive functions</code>, waiting for the <code>problematicDf$test</code> to be created kick in <em>as soon</em> as the empty <code>df</code> is created (with <code>class = NULL</code>). They do not update afterwards anymore. They only update when another selection is made. 
  This causes (in my case) the program to crash since I need to keep on working and subsetting etc. with the so created <code>data.frame</code>.</p>
  
  <p>How to handle this?!
  I could include an <code>if else</code> and check for <code>class = NULL</code>. But it seems to me that this is an unelegant way.</p>