removed unnecessary catching of TypeError