check if _mem is NULL