title: Can not delete realm object on NavigatorIOS right click action
body: <p>I am trying to add a single sign on feature in a react-native app. I am using realm for data persistence. It is working fine with sign in process and stores data when user is login in fist time. But I want to remove user object from local storage when I click on logout button in navigator top right corner. </p>
  
  <p><a href="https://i.stack.imgur.com/jcF51.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jcF51.png" alt="home screen"></a></p>
  
  <p>I am getting an <code>Invalid arguments</code> exception when I try to delete user object from realm storage in <code>onRightButtonPress</code> event. Here is code for this event in NavigatorIOS. </p>
  
  <pre><code>&lt;NavigatorIOS
      barTintColor="#000000"
      tintColor="#fff"
      titleTextColor="#fff"
      ref={(ref) =&gt; this._navigator = ref}
      style={{flex: 1,backgroundColor: '#fff'}}
      initialRoute={{
          title: 'NOOZOO',
          component: Home,
          leftButtonIcon: require('../images/menu.png'),
          onLeftButtonPress: () =&gt; { this._drawer.open() },
          rightButtonTitle: 'Logout',
          onRightButtonPress: () =&gt; {alert('Logout');
                                     console.log({name: global.__user.name,token: global.__user.token});
                                     var users = realm.objects('User');
                                     console.log(users.length);
                                     console.log(users[0].isValid());
                                     realm.write(()=&gt;{
                                      realm.delete('User', users[0]);
                                    });
                                     console.log('deleted');
                                    this._navigate({'title':'Company','routeName':'Home','active':false,'iconUrl': require('../images/check.png'),'newView':false}); 
  
                                    console.log(users);
                                    },
      }}/&gt;
  </code></pre>
  
  <p>I am printing some values to consoles in order to verify if realm is accessible and have some object in storage, which seems fine as in following image. </p>
  
  <p><a href="https://i.stack.imgur.com/cvziC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cvziC.png" alt="Console output when Logout is pressed"></a></p>
  
  <p>I don't know if I am doing something wrong with realm method call or something. I have seen the docs for realm and also read issue about it on github but was unable to resolve this issue. Any help would be appreciated. </p>