How To Check For Valueerror In Python