fixed: don't return NULL ptr in function with boolean return value