C++ gameplay coding style suggestion: more checks at the start of functions

Good idea, I’ll be adding that check to my project