Add validator.isOfType and demandType methods