Name Variants fix

Catch for NULL name_variant value. Also, required addition of name_type
and encoding_type records to database tables.