coverity, check if pointer was null