checking if speed and direction are not empty