make sure the pointer is valid bfore using it