check for valid targets when flying

closes #4972