isNotEmpty
Checks whether this weak reference still contains some data.
If this function returns true, the weak reference still contained some data at the moment where the function was called. Note that this does not guarantee that a subsequent call to read will return any data, as the data could have been cleared in between.
If you need to write an algorithm that depends on the data and its presence, prefer using read and a null-check to ensure that the data doesn't disappear between the test and the access.
See also
Read the current value.