Attempt to invoke virtual method

Hi dev. I want to upload an image to G-Drive.
I used the code below:
Capture d'écran 2024-08-24 132751


blocks(2)

An error appears :
Attempt to invoke virtual method ‘boolean java.lang.String.contains(java.lang.CharSequence)’ on a null object reference

And the progress dialog is still running.

Who can help me?
Thanks.