Added missing setAsType method.