Extra checks to deal with empty databases
Remove useless rospy.spin()