Moved file type test to MidiFile._messages.