ptr_valid: test whether a ptr is valid.