added validation for trip update function