return nil if ticket is not valid