check whether name is valid in BamAlignmentEncoderBase::encodeAlignment