plusM and timesM input validation