Found a better way to determine if results are empty