Hey @adirayer, it seems your one of fval and val doesn’t contain integer value. Try printing both using print statement just above the comparison line, to debug which one is missing. After you get which one is none, try to see if you set/passed the value for that. In case doubt persists, do share the link of your ipynb notebook after saving it on google drive.
Hope this resolved your doubt.