Add class to take either numeral or integer as input.