Check if data is nil when fetching from database.

Before, the error code was never actually checking for an error.
If data was nil, the overlay would have happily sent nil to the worker block, which in turn couldn't handle it.