More careful type checking in create_cobra_model_from_sbml_doc