Added validateOpt helper (#55)