do not output message if no example query was found and more checks for null in some helper methods