[fix] Return pointer to avoid risk of returning null reference