Comment correction
Switched to use isinstance instead of hard type comparing
Changed remaining exceptions to ValueErrors