The TypeCalculator.instance_of? method for PStringType only checks if the incoming object is a String and if it's size is compliant with the size_type. It does not check if the type has values and, if so, if the given string is one of them. This check must be added.
probability: medium (instance_of? on string values)
severity: medium (could produce incorrect result)
test level: unit