new validation functions

part of https://github.com/opentechinstitute/commotion-lua-helpers/pull/3