Added exceptions to converting functions