verefication for null ptr returned