Instead of a switch on the type, do a dataType.isCoercibleTo(PDataType.DECIMAL), because that'll cover you for more cases.