Add asserts for sequence numbers
MAX(sequence) can be None
Merge pull request #255 from NielsZeilemaker/fix_sequence_number_check

Add asserts for sequence numbers