Sounds like you want to test for an internet connection before submitting a value to firebase.
You can do this with blocks, but this is my preferred extension:
permissions:
android.permission.ACCESS_NETWORK_STATE
android.permission.INTERNET
Use this in an if/else statement block in you update click event