added validation to trip delete function