added a simple error checking function. checks if any elements found.
if none found returns False. Allows main function to exit neatly.