Fix error in check for undefined/null player parameters

Whoops, this should have been in my previous PR... sorry! Also have now rebased your `master` branch onto mine to make for cleaner future PRs. :smile: