結果 : how to handle nonetype error in python