Asynchronous methods usually do not return null
in place of a task, especially if the method is defined using the async
keyword. Therefore, a null
-check against the returned task is unnecessary or resulted from a typo.
Retrieve the value represented by the task by awaiting its completion using await
and apply the null
-check on the actual value.