Add check whether input parameter is NULL before call freepool API defined in MDE.