I'm using domdocument load to fetch some data. On occasion, this data is not available and when the script runs, I will get errors or warnings. I noticed that I can test for a return value if the data is not there. Is it best to use a while loop or an if statement?