"TRUNK-2758 Automated Error Report: NPE when creating patient without an identifier type"

Checking if a PatientIdentifierType was unique before testing if it was valid caused the NullPointerException described in the ticket, so the check for a PatientIdentifierType was moved to occur before the uniqueness test.