Added null check in update to prevent errors with null destinations.