I'm not sure why this occurs. I try this script in a new project and it's 100% fine. If I try this on my project it gives me an error. Even if I remove all the scripts I added, it's the same error. (It's in V16.2)
Script 'LukaUtilities' line 193: TypeError occured
can't convert NilClass to...