added type test to new to avoid typod type importing as NULL
added type test to new to avoid typod type importing as NULL

Ensembl/ensembl-funcgen,Ensembl/ensembl-funcgen,Ensembl/ensembl-funcgen,Ensembl/ensembl-funcgen