Check for null ptr